[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Schemas: Best Practices
I think that a best practices guide needs also to document the difference between referencing an element or a group of element and referencing a complex or simple type when several namespaces are used. To show what I mean, let's take this example: In the "inc:" namespace, a complex type inc:byType is used as a type to define an element named inc:byEltRef. However, the 2 following declarations in a schema for another namespace (let's prefix it by main) including this one: <xsd:element name="byType" type="inc:byType"/> and <xsd:element ref="inc:byEltRef"/>, are far from being equivalent since they are describing: <main:byType> <inc:child> The element has been included by its type. </inc:child> </main:byType> vs <inc:byEltRef> <inc:child> The element has been included by reference to an element. </inc:child> </inc:byEltRef> The documents are available under http://www.dyomedea.com/tests/ns/ IMHO, this difference may be important in the decision to use complex type definitions vs element (or group of elements) references. Hope this helps. Eric -- ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://dyomedea.com http://xmlfr.org http://4xt.org http://ducotede.com ------------------------------------------------------------------------
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|