[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [ubl-ndrsc] Bill&Eve's proposal on local/global elements
----- Original Message ----- From: "Eve L. Maler" <eve.maler@sun.com> > The following was whipped up by Bill and Eve after we recessed for the > day. We hope it's coherent, and will lead to productive discussion tomorrow. > Hi gang, I wish that I could be there for this discussion tomorrow, but here are my 2 euros. Using Bill & Eve's example, I constructed a very simple UML class diagram in Rational Rose. See the attached GIF image. It's important to note that this UML model contains *NO* information specific to XML; it's just an abstract information model, independent of any implementation syntax. However, when I import this model into my schema generation tool, I apply a set of default transformation rules and get an XSD that looks identical to Eve's example. See Party-1.xsd attached. Here is an excerpt: <xs:complexType name="PartyType"> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="Identifier" type="IdentifierType"/> <xs:element name="Address" type="AddressType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> My schema generator also includes a configuration switch to generate qualified names, which was originally intended for generating DTDs that required globally unique element names. See Party-2.xsd attached. An excerpt: <xs:complexType name="PartyType"> <xs:sequence> <xs:element name="Party.name" type="xs:string"/> <xs:element name="Party.Identifier" type="IdentifierType"/> <xs:element name="Party.Address" type="AddressType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> Although I would NOT recommend generating a schema like this one, it illustrates Eve & Bill's point that you can derive unambiguous dictionary entry names by qualifying local names with their scope name. These qualified names (e.g. Party.Identifier and Address.Identifier) are identical to those in Eve's email message. Because both of these schemas where auto-generated from a generic UML information model, it would be a trivial exercise to also generate a set of dictionary entries for a BIE catalog using the qualified names. If you assume that the future Core Components and/or BIE models are abstract models similar to my simple UML diagram, then this one model can generate both XSD schemas using the simple locally scoped names, plus a set of qualified names used for other purposes. Virtually yours, Dave Carlson
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC