Skip to content

import ignored, when importing second XSD into the same namespace #1028

Open
@jakubklimek

Description

I have this document and an XSD (linked from it from schemaLocation).

Now, the XSD imports 2 other XSDs with the same targetNamespace:

  <xs:import namespace="http://dia.gov.cz/ns/spolecne-casti-elektronickych-dokumentu/osoby" schemaLocation="https://ofn.gov.cz/společné-části-elektronických-dokumentů/2024-10-04/schémata/osoby/osoba-ve-vztahu-k-dokumentu.xsd"/>
  <xs:import namespace="http://dia.gov.cz/ns/spolecne-casti-elektronickych-dokumentu/osoby" schemaLocation="https://ofn.gov.cz/společné-části-elektronických-dokumentů/2024-10-04/schémata/osoby/fyzická-osoba-ve-vztahu-k-dokumentu.xsd"/>

The XSDs have both the same targetNamespace and contain no conflicting definitions. Nevertheless, the second import is ignored, resulting in an error:
{90310AA0-A8FD-4BC6-9C83-01261FF2DC72}

because that type is defined in the second imported XSD. When I comment out the first import, the second starts working.

This should be legal in XML Schema, and other validators like Altova work fine with it.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions