[Home] [By Thread] [By Date] [Recent Entries]

  • From: Eric van der Vlist <vdv@d...>
  • To: xml-dev@l...
  • 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
------------------------------------------------------------------------

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member