Another problem with nested schema

Discussion in 'XML' started by yannick.beot@gmail.com, Aug 21, 2007.

  1. Guest

    Hi,

    I have a problem with nested namespace in a schema.

    I defined a schema A.
    A is importing a schema B with the namespace nsB and a schema C with
    the namespace nsC.
    But both B and C are importing a schema D with a namespace D.

    I have a validation error because some elements are defined twice.

    Normally, I can not modify B, C and D.

    How can I avoid such problem?

    Thanks in advance

    Yannick
     
    , Aug 21, 2007
    #1
    1. Advertising

  2. wrote:

    > I have a problem with nested namespace in a schema.
    >
    > I defined a schema A.
    > A is importing a schema B with the namespace nsB and a schema C with
    > the namespace nsC.
    > But both B and C are importing a schema D with a namespace D.
    >
    > I have a validation error because some elements are defined twice.


    If the schemas have all different target namespaces then I don't
    understand why you would have some elements defined twice. Can you show
    us the relevant parts of those schemas?

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Aug 21, 2007
    #2
    1. Advertising

  3. Guest

    The first imported schema (B) is A is :
    <import namespace="urn:eek:asis:names:tc:SAML:1.0:assertion"
    schemaLocation="cs-sstc-schema-assertion-1.1.xsd"/>

    The second imported schema (C) is A is :
    <import namespace="urn:eek:asis:names:tc:SAML:2.0:assertion"
    schemaLocation="saml-schema-assertion-2.0.xsd"/>

    They can be found there :
    http://www.oasis-open.org/committees/download.php/3408/oasis-sstc-saml-schema-assertion-1.1.xsd
    http://docs.oasis-open.org/security/saml/v2.0/saml-schema-assertion-2.0.xsd

    The imported schema (D) in B and C is :
    <import namespace="http://www.w3.org/2000/09/xmldsig#"
    schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/
    xmldsig-core-schema.xsd"/>

    I modified B and C to use exactly the same schema although an obvious
    error is saying that ds:MgmtData is already declared.

    I have read that importing the same schema should be allowed but
    xmlspy is still complaining (while castor is simply overwriting .java
    it has already created).

    Yannick

    On 21 août, 13:44, Martin Honnen <> wrote:
    > wrote:
    > > I have a problem with nested namespace in a schema.

    >
    > > I defined a schema A.
    > > A is importing a schema B with the namespace nsB and a schema C with
    > > the namespace nsC.
    > > But both B and C are importing a schema D with a namespace D.

    >
    > > I have a validation error because some elements are defined twice.

    >
    > If the schemas have all different target namespaces then I don't
    > understand why you would have some elements defined twice. Can you show
    > us the relevant parts of those schemas?
    >
    > --
    >
    > Martin Honnen
    > http://JavaScript.FAQTs.com/
     
    , Aug 22, 2007
    #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,614
    Markus
    Nov 23, 2005
  2. Klaus Johannes Rusch

    Re: Convert DB2 schema to XML Schema

    Klaus Johannes Rusch, Aug 6, 2003, in forum: XML
    Replies:
    0
    Views:
    561
    Klaus Johannes Rusch
    Aug 6, 2003
  3. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,297
    Stanimir Stamenkov
    Apr 25, 2005
  4. Replies:
    1
    Views:
    529
    George Bina
    Jul 20, 2006
  5. Boris Ozegovic

    XML schema, importing another schema

    Boris Ozegovic, May 6, 2008, in forum: XML
    Replies:
    1
    Views:
    430
    Martin Honnen
    May 6, 2008
Loading...

Share This Page