Search code examples
xmlxsdxsd-validationxml-validation

How to define global in XSD


I would like to define TEST as global in XSD

          <xs:element name="TEST">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="TEST_LOGIN" type="xs:string" />
                <xs:element name="DOCUMENT" type="xs:string" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>

Solution

  • Top-level (children of xs:schema) component definitions are inherently globally available.

    Nested definitions are only locally available – not referenceable elsewhere.

    See also