| JezUK Ltd - W3C Schema for xml:space |
| << Previous | March 2005 | Next >> |
Look Ma! I wrote an XSD!
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="http://www.w3.org/XML/1998/namespace">
<xs:attribute name="space">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="preserve"/>
<xs:enumeration value="default"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:schema>
Stick it in a file call xmlspace.xsd and include it in your own schemas using
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xmlspace.xsd"/>
...
<xs:element name="myElement">
<xs:complexType ...
...
<xs:attribute ref="xml:space"/>
</xs:complexType>
</xs:element>
National Forest 50km (1)
The Highway Code - Rule 92 (7)
Courgette Cornucopia (5)
The Rainbow Orchid Volume Two. I am excited. Fact. (1)