XSD mapping pattern
Missing...
Example
As for <<codeList>>, the mapping of <<datatype>> used to type simple properties consists of two steps.
The first step is the creation of the simpleType corresponding to the BaseType.
Code Block | ||||
---|---|---|---|---|
| ||||
<simpleType name="DateBaseType"> <restriction base="xsd:date"> </restriction> </simpleType> |
The second step is the creation of the complexType which defines the attribute nilReason.
Code Block | ||||
---|---|---|---|---|
| ||||
<complexType name="DateType"> <simpleContent> <extension base="aixm:DateBaseType"> <attribute name="nilReason" type="gml:NilReasonEnumeration "/> </extension> </simpleContent> </complexType> |
<<datatype>> with Unit of Measurement
A Unit of measurement (UOM) exists for many data types that take numerical values. This has been modelled as a uom attribute in the <<datatype>> class.
The XSD mapping of uom types follows the same rules as for any other <<codelist>>, except that no complex type is required with the nilReason.
<simpleType name="UomDepthType">
<union>
<simpleType>
<restriction base="xsd:string">
<enumeration value="MM">
</enumeration>
<enumeration value="CM">
</enumeration>
<enumeration value="IN">
</enumeration>
<enumeration value="FT">
</enumeration>
</restriction>
</simpleType>
<simpleType>
<restriction base="string">
<pattern value="OTHER:\w{2,58}"/>
</restriction>
</simpleType>
</union>
</simpleType>
In a second step, the class ValDepthBaseType is generated as a simple type, as described in 4.11.2.
<simpleType name="ValDepthBaseType">
<restriction base="xsd:decimal"/>
</simpleType>
Then, the uom attribute is added to the complexType ValDepthType, after the definition of nilReason attribute.
<complexType name="ValDepthType">
<simpleContent>
<extension base="aixm:ValDepthBaseType">
<attribute name="nilReason" type="gml:NilReasonEnumeration"/>
<attribute name="uom" type="aixm:UomDepthType" use="required"/>
</extension>
</simpleContent>
</complexType>
Particular cases
<<datatype>> with no BaseType
Wiki Markup |
---|
The 5 data types listed in 2.7.1.1 map directly to the built-in datatypes defined by the XML schema specification. The default datatypes are string, float, double, etc, which are considered simpleTypes. \\ The AlphaType acts as a convenient example. !worddav1107a322f49687c3c72f01441b7793fd.png|height=210,width=281! \\ <<span style="color: #000080"><strong>simpleType</strong></span> name="<span style="color: #000080"><strong>AlphaType</strong></span>"> <restriction base="xsd:<span style="color: #000080"><strong>string</strong></span>"> <pattern value="\[A-Z\]*"/> </restriction> </simpleType> \\ |
<<datatype>> XHTMLBaseType
<<datatype>> XHTMLBaseType represents a structured XHTML document compliant with http://www.w3.org/1999/xhtml. It should be mapped as follows in XML:
<complexType name="XHTMLBaseType">
<sequence>
<any namespace="http://www.w3.org/1999/xhtml" minOccurs="1" maxOccurs="unbounded" processContents="skip"/>
</sequence>
</complexType>