XSD Problem

Discussion in 'XML' started by Milan, Jul 6, 2003.

  1. Milan

    Milan Guest

    I have this situation:

    <myxmldoc xmlns:b="urn:schemas-microsoft-com:BizTalkServer"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="C:\shema.xsd">
    <Invoice id="invoice">
    <myTag1>
    ....
    </myTag1>
    </Invoice>
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"
    ....
    </Signature>
    </myxmldoc>


    The problem is that XML Spy complains, when validating using XML Shema:

    "Mandatory local element 'Signature' must be unqualified (i.e. outside of
    any namespace), but you are using a default namespace."

    What is this? Is there some workaround? I'd like to keep "Signature"
    element (and "myxmldoc" element) exactly as it is now.
    Milan, Jul 6, 2003
    #1
    1. Advertising

  2. Milan

    Milan Guest

    Thank you. Is there a workaround to have one shema and to keep the
    same XML doc as it is now?
    Milan, Jul 6, 2003
    #2
    1. Advertising

  3. (Milan) writes:

    > I have this situation:
    >
    > <myxmldoc xmlns:b="urn:schemas-microsoft-com:BizTalkServer"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xsi:noNamespaceSchemaLocation="C:\shema.xsd">
    > <Invoice id="invoice">
    > <myTag1> ... </myTag1>
    > </Invoice>
    > <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"
    > ...
    > </Signature>
    > </myxmldoc>
    >
    >
    > The problem is that XML Spy complains, when validating using XML Shema:
    >
    > "Mandatory local element 'Signature' must be unqualified (i.e.
    > outside of any namespace), but you are using a default namespace."
    >
    > What is this? Is there some workaround? I'd like to keep "Signature"
    > element (and "myxmldoc" element) exactly as it is now.


    What does the schema document 'C:\schema.xsd' say about the
    Signature element? Judging by the error message, I'd guess it
    declares it as an element local to the complex type of
    element 'myxmldoc', and does not associate it with any
    namespace.

    If you want the Signature element to be in the namespace
    http://www.w3.org/2000/09/xmldsig# then (a) you won't be able
    to declare it in a schema document without any target namespace,
    and (b) the declaration for the complex type used by 'myxmldoc'
    will need to refer to a Signature element in the dsig namespace,
    not to a Signature element without an associated namespace.

    If you'll post the relevant parts of your schema, it will be easier
    to figure out what exactly you are trying to do.

    In the meantime, I hope this helps a little.

    -C. M. Sperberg-McQueen
    World Wide Web Consortium
    C. M. Sperberg-McQueen, Jul 7, 2003
    #3
    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. Markus
    Replies:
    1
    Views:
    1,084
    Markus
    Nov 22, 2005
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    471
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Replies:
    1
    Views:
    848
    Martin Honnen
    Jan 14, 2004
  4. Peter Aberline

    xsd:any as a child of xsd:all

    Peter Aberline, Apr 5, 2004, in forum: XML
    Replies:
    0
    Views:
    775
    Peter Aberline
    Apr 5, 2004
  5. Bernd Oninger
    Replies:
    1
    Views:
    516
    Henry S. Thompson
    Jun 30, 2004
Loading...

Share This Page