XML technologies / XML Schema / Data type reference / xs:NOTATION
(Excerpt from “XML Schema” by Eric van der Vlist)
Emulating the XML 1.0 construct
Derived from: xs:anySimpleType
Primitive type: xs:NOTATION
Known subtypes: none
Facets: xs:enumeration, xs:length, xs:maxLength, xs:minLength, xs:pattern, xs:whiteSpace
Definition
<xs:simpleType name="NOTATION" id="NOTATION">
<xs:restriction base="xs:anySimpleType">
<xs:whiteSpace value="collapse" fixed="true"/>
</xs:restriction>
</xs:simpleType>Description
The value and lexical spaces of xs:NOTATION are references to notations defined using element xs:notation. This element and data type therefore emulate XML 1.0’s NOTATION construct with namespace support.
Restrictions
Notations are very rarely used in real applications.
xs:notation cannot be used directly; a derived type must be used as shown in the example.
Example
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:notation name="jpeg" public="image/jpeg" system="file:///usr/bin/xv"/>
<xs:notation name="gif" public="image/gif" system="file:///usr/bin/xv"/>
<xs:notation name="png" public="image/png" system="file:///usr/bin/xv"/>
<xs:notation name="svg" public="image/svg" system="file:///usr/bin/xsmiles"/>
<xs:notation name="pdf" public="application/pdf" system="file:///usr/bin/acroread"/>
<xs:simpleType name="graphicalFormat">
<xs:restriction base="xs:NOTATION">
<xs:enumeration value="jpeg"/>
<xs:enumeration value="gif"/>
<xs:enumeration value="png"/>
<xs:enumeration value="svg"/>
<xs:enumeration value="pdf"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="picture">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute name="type" type="graphicalFormat"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
Copyright © 2003 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “XML Schema” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de