multiple schema elements in one file?

Discussion in 'XML' started by Ingo Siebert, May 4, 2007.

  1. Ingo Siebert

    Ingo Siebert Guest

    Hi,

    is it possible to have more than one schema in one file defined?
    Is something like the code below possible?

    <xsd:schemas>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" ... >
    <xsd:element name="execute"> ...
    </xsd:schema>

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" ... >
    <xsd:element name="execute"> ...
    </xsd:schema>
    </xsd:schemas>



    Background (why do i ask that):
    I want to define complex objects in different namespaces, because my
    code generation tool generates java packages for every namespace.
    I don't want to have all generated object in one namespace and i don't
    want to create a new file for every namespace.

    Cheers,

    Ingo
     
    Ingo Siebert, May 4, 2007
    #1
    1. Advertising

  2. Ingo Siebert wrote:

    > is it possible to have more than one schema in one file defined?
    > Is something like the code below possible?
    >
    > <xsd:schemas>
    > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" ... >
    > <xsd:element name="execute"> ...
    > </xsd:schema>
    >
    > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" ... >
    > <xsd:element name="execute"> ...
    > </xsd:schema>
    > </xsd:schemas>


    With the W3C XSD schema language you need one schema for each target
    namespace.



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, May 4, 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.

Share This Page