OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XML Schemas: Best Practices

[ Lists Home | Date Index | Thread Index ]
  • From: Eric van der Vlist <vdv@dyomedea.com>
  • To: xml-dev@lists.xml.org
  • Date: Thu, 19 Oct 2000 11:12:24 +0200

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
------------------------------------------------------------------------




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS