Schemas & Namespaces

C

chuck

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
 
M

Martin Honnen

chuck said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top