Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Schemas & Namespaces (http://www.velocityreviews.com/forums/t564743-schemas-and-namespaces.html)

chuck 12-30-2007 01:47 PM

Schemas & Namespaces
 
Hello,

Is it correct to say that a schema is first processed as an XML file where
declared namespaces, the default namespace, etc. are handled and then a
schema file is processed as a schema file, so, if one has:

<xsd:element name="address" type="AddressType" />
<xsd:element name="order" type="OrderType" />
<xsd:element name="FullName" type="NameType" />

.. . . then address, order, and fullname are placed in the targetnamespace,
even if the targetnamespace and default namespace are different?

Thanks.

-c



Martin Honnen 12-30-2007 02:05 PM

Re: Schemas & Namespaces
 
chuck wrote:

> Is it correct to say that a schema is first processed as an XML file where
> declared namespaces, the default namespace, etc. are handled and then a
> schema file is processed as a schema file, so, if one has:
>
> <xsd:element name="address" type="AddressType" />
> <xsd:element name="order" type="OrderType" />
> <xsd:element name="FullName" type="NameType" />
>
> . . . then address, order, and fullname are placed in the targetnamespace,
> even if the targetnamespace and default namespace are different?


If you have a targetNamespace set in your schema then the semantics of
xsd:element declarations depends on the position and on the
elementFormDefault setting.
If elementFormDefault="qualified" then all elements declarations define
elements in the targetNamespace, otherwise, with
elementFormDefault="unqualfied", only the top-level element declarations
define elements in the targetNamespace.


--

Martin Honnen
http://JavaScript.FAQTs.com/


All times are GMT. The time now is 11:15 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.