M
Mhaxx
I'd like to export my XML data type definitions into a separate file, so
I can use them from other XSD: how can I do?
Mhaxx
<<<example.xsd>>>
<?xml version="1.0" encoding="iso-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.com"
xmlns="http://www.example.com"
elementFormDefault="qualified">
<!-- * * * * * DATA TYPES DEFINITION * * * * * -->
<xsd:complexType name="pointType">
<xsd:sequence>
<xsd:element name="x" type="xsd:nonNegativeInteger"/>
<xsd:element name="y" type="xsd:nonNegativeInteger"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="extensionType">
<xsd:sequence>
<xsd:element name="height" type="xsdositiveInteger"/>
<xsd:element name="width" type="xsdositiveInteger"/>
</xsd:sequence>
</xsd:complexType>
<!-- * * * * * * SCHEMA DEFINITION * * * * * * -->
<xsd:element name="project">
<xsd:complexType>
...
...
</xsd:complexType>
</xsd:element>
</xsd:schema>
I can use them from other XSD: how can I do?
Mhaxx
<<<example.xsd>>>
<?xml version="1.0" encoding="iso-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.com"
xmlns="http://www.example.com"
elementFormDefault="qualified">
<!-- * * * * * DATA TYPES DEFINITION * * * * * -->
<xsd:complexType name="pointType">
<xsd:sequence>
<xsd:element name="x" type="xsd:nonNegativeInteger"/>
<xsd:element name="y" type="xsd:nonNegativeInteger"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="extensionType">
<xsd:sequence>
<xsd:element name="height" type="xsdositiveInteger"/>
<xsd:element name="width" type="xsdositiveInteger"/>
</xsd:sequence>
</xsd:complexType>
<!-- * * * * * * SCHEMA DEFINITION * * * * * * -->
<xsd:element name="project">
<xsd:complexType>
...
...
</xsd:complexType>
</xsd:element>
</xsd:schema>