Schemas & Namespaces

Discussion in 'XML' started by chuck, Dec 30, 2007.

  1. chuck

    chuck Guest

    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
     
    chuck, Dec 30, 2007
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Dec 30, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oleg Ogurok

    dynamic color schemas with ASP.NET

    Oleg Ogurok, Jun 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    453
    =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
    Jun 8, 2004
  2. Green Start Button

    Microsoft CDO Schemas...

    Green Start Button, Aug 11, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    649
    Anon-E-Moose
    Aug 11, 2005
  3. Soeren
    Replies:
    2
    Views:
    363
    Waxolunist
    Sep 22, 2004
  4. Dominique
    Replies:
    3
    Views:
    466
    Dominique
    Jun 29, 2004
  5. Replies:
    6
    Views:
    439
Loading...

Share This Page