SHARE
TWEET

Mapping XML schema to Ladon types

ralienpp Mar 5th, 2012 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MessageAbstractType(LadonType):
  2.         AP_Info: AP_InfoType
  3.         MSSP_Info: MSSP_InfoType
  4.         MajorVersion = {
  5.                 'type': int,
  6.                 'nullable': False}
  7.         MinorVersion = {
  8.                 'type': int,
  9.                 'nullable': False}
  10.        
  11. class AP_InfoType(LadonType):
  12.         AP_ID = {
  13.                 'type': unicode, #xs:anyURI
  14.                 'nullable': False}
  15.         AP_TransID = {
  16.                 'type': unicode, #xs:NCName
  17.                 'nullable': False}
  18.         AP_PWD = {
  19.                 'type': unicode, #xs:string
  20.                 'nullable': False}
  21.         Instant = {
  22.                 'type': unicode, #xs:dateTime TODO should we take it as a string?
  23.                 'nullable': False}
  24.         AP_URL = {
  25.                 'type': unicode, #xs:anyURI
  26.                 'nullable': True}
  27.  
  28. class MSSP_InfoType(LadonType):
  29.         MSSP_ID: MeshMemberType
  30.         Instant = {
  31.                 'type': unicode, #xs:dateTime TODO
  32.                 'nullable': True}
  33.        
  34.        
  35. class MeshMemberType(LadonType):
  36.         DNSName = {
  37.                 'type': unicode,
  38.                 'nullable': True} #TODO minOccurs="0", is it the same?
  39.         IPAddress = {
  40.                 'type': unicode,
  41.                 'nullable': True} #TODO
  42.         URI = {
  43.                 'type': unicode,
  44.                 'nullable': True} #TODO
  45.         IdentifierString = {
  46.                 'type': unicode,
  47.                 'nullable': True} #TODO
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top