Search code examples
xmlxsd

XSD import without attributes


I'm wondering whether the following XSD line is valid and what does it mean should it be valid?

<xsd:import/>

Full code can be found here


Solution

  • See https://www.w3.org/TR/xmlschema-1/#composition-schemaImport whichs says

    Note: Since both the namespace and schemaLocation [attribute] are optional, a bare <import/> information item is allowed. This simply allows unqualified reference to foreign components with no target namespace without giving any hints as to where to find them.