[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Party XML Schema Defintions
I have taken the latest published version of the Core Component spreadsheet and used those components marked as core to formally define a Party in an XML Schema. In doing so I have deliberately used attributes to record the role/type/purpose of an element as these properties can be replaced in message specific names (e.g Buyer and Seller in place of Party and HomeTelNumber, BusinessFaxNumber in place of CommunicationPoint). I have also defined abstract elements for all elements that are, in my opinion, likely to be used independently of Party details. I have also chosen to change some element names for the sake of consistency between element (to reduce the total number of elements that need to be defined in a schema) and have also used alternative names for some which I just plain disagree with the analysis group on. (I remain a bloody-minded programmer!) The attached PNG file provides an illustrated tree for the model that can be viewed on a web browser(as long as its not too out of date!) while the XML schema is in the file with the xsd extension. Please note that the illustration does not show the attributes assigned to each element: you will need to consult the schema for details of what these are intended to do. Martin Bryan
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" elementFormDefault="qualified"> <xsd:complexType name="PartyType"> <xsd:annotation> <xsd:documentation>Party assigned role in business process</xsd:documentation> </xsd:annotation> <xsd:all> <xsd:element name="Identity" type="IdentityType"> <xsd:annotation> <xsd:documentation>Means of identifying party</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="Reference" type="ReferenceType" minOccurs="0"> <xsd:annotation> <xsd:documentation>Reference to external documentation regarding party</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="Address" type="AddressType" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Address at which party can be contacted</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="Location" type="LocationType" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Identifier used to locate party</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="CommunicationPoint" type="CommunicationPointType" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation>Means by which party can be contacted</xsd:documentation> </xsd:annotation> </xsd:element> </xsd:all> <xsd:attribute name="Type" use="optional"> <xsd:annotation> <xsd:documentation>Used to distinguish type of party</xsd:documentation> </xsd:annotation> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Organization"/> <xsd:enumeration value="Individual"/> <xsd:enumeration value="Group"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="Role" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Role played by party Note: Role should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractParty occurs more than once in a single message. </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="Gender" use="optional" value="NotApplicable"> <xsd:annotation> <xsd:documentation>Gender of individual - otherwise not applicable</xsd:documentation> </xsd:annotation> <xsd:simpleType> <xsd:restriction base="xsd:token"> <xsd:enumeration value="Male"/> <xsd:enumeration value="Female"/> <xsd:enumeration value="NotApplicable"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> <xsd:complexType name="IdentityType"> <xsd:annotation> <xsd:documentation>Means of identifying party</xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="Name" minOccurs="0"> <xsd:annotation> <xsd:documentation>Name used to identify party</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:sequence> <xsd:element name="Identifier" minOccurs="0"> <xsd:annotation> <xsd:documentation>Identifier useed to indicate party e.g. Passport Number</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="SchemeName" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Name of body issuing identifier</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="SchemeURI" type="xsd:uriReference" use="optional"> <xsd:annotation> <xsd:documentation>Pointer to source of valid identifiers</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:element name="Code" minOccurs="0"> <xsd:annotation> <xsd:documentation>Code from external enumerated list used to identify party</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="SchemeName" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Name of body issuing identifier</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="SchemeURI" type="xsd:uriReference" use="optional"> <xsd:annotation> <xsd:documentation>Pointer to source of valid identifiers</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:sequence> </xsd:complexType> <xsd:complexType name="TitleType"> <xsd:annotation> <xsd:documentation>Title assigned to individual party</xsd:documentation> </xsd:annotation> <xsd:all> <xsd:element name="Text" minOccurs="0"> <xsd:annotation> <xsd:documentation>Text used to indicate title e.g. Mr, Mrs, Herr Doktor</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="Code" minOccurs="0"> <xsd:annotation> <xsd:documentation>Code used to identify title required within externally administered list</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="SchemeName" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Name of body issuing identifier</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="SchemeURI" type="xsd:uriReference" use="optional"> <xsd:annotation> <xsd:documentation>Pointer to source of valid identifiers</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> </xsd:all> </xsd:complexType> <xsd:complexType name="ReferenceType"> <xsd:annotation> <xsd:documentation>Reference to external documentation</xsd:documentation> </xsd:annotation> <xsd:all> <xsd:element name="Identifier"> <xsd:annotation> <xsd:documentation>Identifier of referenced document</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="SchemeName" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Name of body issuing identifier</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="SchemeURI" type="xsd:uriReference" use="optional"> <xsd:annotation> <xsd:documentation>Pointer to source of valid identifiers</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:element name="Description" minOccurs="0"> <xsd:annotation> <xsd:documentation>Free-text description of referenced document</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="DateTime" type="DateTimeType" minOccurs="0"> <xsd:annotation> <xsd:documentation>Date on which referenced document was created</xsd:documentation> </xsd:annotation> </xsd:element> </xsd:all> <xsd:attribute name="Type" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Used to distinguish type of referenced document Note: Type should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractReference occurs more than once in a single messag.</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> <xsd:complexType name="DateTimeType"> <xsd:annotation> <xsd:documentation>Date and, optionally, time</xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="Date"> <xsd:annotation> <xsd:documentation>ISO 8601 Date</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="Format" type="xsd:token" use="optional"> <xsd:annotation> <xsd:documentation>Format used for date if not full ISO 8601 format</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:element name="Time" minOccurs="0"> <xsd:annotation> <xsd:documentation>ISO 8601 time</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="Format" type="xsd:token" use="optional"> <xsd:annotation> <xsd:documentation>Format used for time if not full ISO 8601 format</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="TimeZoneOffset" type="xsd:time"> <xsd:annotation> <xsd:documentation>Number of hours a minutes from Greenwich Mean Time</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute name="Purpose" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Used to purpose for which date/time has been defined Note: Purpose should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractDateTime occurs more than once in a single messag.</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> <xsd:complexType name="AddressType"> <xsd:annotation> <xsd:documentation>Address at which party can be contacted</xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:choice minOccurs="0"> <xsd:element name="BuildingName" minOccurs="0"> <xsd:annotation> <xsd:documentation>Name by which building is identified</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="BuildingNumber" minOccurs="0"> <xsd:annotation> <xsd:documentation>Number bywhich building is identified</xsd:documentation> </xsd:annotation> </xsd:element> </xsd:choice> <xsd:element name="StreetName" minOccurs="0"> <xsd:annotation> <xsd:documentation>Name of street on which building is located</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="Place"> <xsd:annotation> <xsd:documentation>Name of city, town, etc. in which address is to be found</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="Region" minOccurs="0"> <xsd:annotation> <xsd:documentation>Administrative area within country, e.g. State, Department, Lander, County</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="Country" minOccurs="0"> <xsd:annotation> <xsd:documentation>Country in which place is located</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="PostCode" minOccurs="0"> <xsd:annotation> <xsd:documentation>Code used by postal authorities to identify address</xsd:documentation> </xsd:annotation> </xsd:element> </xsd:sequence> <xsd:attribute name="Type" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Used to distinguish type of address (e.g. Home, Office) Note: Type should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractAddress occurs more than once in a single message. </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="Purpose" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Used to distinguish purpose of address (e.g. Delivery or Mailing) Note: Purpose should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractAddress occurs more than once in a single messag.</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> <xsd:complexType name="LocationType"> <xsd:annotation> <xsd:documentation>Details of how to locate party</xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="Purpose" minOccurs="0"> <xsd:annotation> <xsd:documentation>Purpose for which location is defined (may be empty if code attribute is present)</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="Code" type="xsd:token" use="optional"/> </xsd:complexType> </xsd:element> <xsd:choice> <xsd:element name="Identifier" minOccurs="0"> <xsd:annotation> <xsd:documentation>Unique idenfiier for location</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="SchemeName" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Name of body issuing identifier</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="SchemeURI" type="xsd:uriReference" use="optional"> <xsd:annotation> <xsd:documentation>Pointer to source of valid identifiers</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:element name="Name" minOccurs="0"> <xsd:annotation> <xsd:documentation>Name by which location is identified</xsd:documentation> </xsd:annotation> </xsd:element> </xsd:choice> </xsd:sequence> <xsd:attribute name="Type" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Used to distinguish type of location (e.g. Airport or Train station) Note: Type should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractLocation occurs more than once in a single message. </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="Purpose" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Used to distinguish purpose of locator (e.g. Departure, Arrival) Note: Purpose should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractLocation occurs more than once in a single messag.</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> <xsd:complexType name="CommunicationPointType"> <xsd:annotation> <xsd:documentation>Means by which party can be contacted</xsd:documentation> </xsd:annotation> <xsd:all> <xsd:element name="Purpose" minOccurs="0"> <xsd:annotation> <xsd:documentation>Purpose for which number is used (may be empty if code attribute is present)</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="Code" type="xsd:token" use="optional"> <xsd:annotation> <xsd:documentation>Code used to determine type of purpose (e.g. Phone, Fax, E-mail)</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:element name="Identifier"> <xsd:annotation> <xsd:documentation>Identification sequence e.g. telephone or fax number or e-mail address</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="SchemeName" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Name of body issuing identifier</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="SchemeURI" type="xsd:uriReference" use="optional"> <xsd:annotation> <xsd:documentation>Pointer to source of valid identifiers</xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> </xsd:all> <xsd:attribute name="Type" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation>Used to distinguish type of communication point (e.g. Home, Business) Note: Type should be indicated by name assigned to element in application schema It should only be recorded in this attribute if the same element derived from AbstractComminicationPoint occurs more than once in a single message. </xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> <xsd:element name="AbstractParty" type="PartyType" abstract="true"> <xsd:annotation> <xsd:documentation>Base element for all applications of PartyType</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="AbstractReference" type="ReferenceType" abstract="true"> <xsd:annotation> <xsd:documentation>Base element for all references to documentation</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="AbstractDateTime" type="DateTimeType" abstract="true"> <xsd:annotation> <xsd:documentation>Base element for all date/times</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="AbstractAddress" type="AddressType" abstract="true"> <xsd:annotation> <xsd:documentation>Base element for all addresses</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="AbstractLocation"> <xsd:annotation> <xsd:documentation>Base element for all location identifiers</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="AbstractCommunicationPoint" type="CommunicationPointType" abstract="true"> <xsd:annotation> <xsd:documentation>Base element for all communication point components</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:simpleType name="ISO3166CountryCode"> <xsd:annotation> <xsd:documentation>Two or three digit code used to identify country in ISO 3166</xsd:documentation> </xsd:annotation> <xsd:list itemType="xsd:token"/> </xsd:simpleType> </xsd:schema>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC