XML technologies / XML Schema / XML Schema element reference / xs:notation

(Excerpt from “XML Schema” by Eric van der Vlist)

Declaring a notation.

<xs:notation
    id = xs:ID
    name = xs:NCName
    public = xs:token
    system = xs:anyURI
    {beliebige Attribute mit einem Nicht-Schema-Namensraum}
    >
    Content: (xs:annotation?)
</xs:notation>

May occur within: xs:schema

Description

xs:notation declares a notation, as do NOTATION declarations in DTDs. The main difference is that notations in W3C XML Schema support namespaces and can be imported into schemas. When used, these notations appear in xs:enumeration facets to create simple types.

Restrictions

Notations are rarely used in practical applications.

Example

<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="Anwendung/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>

Attributes

id
Element ID according to W3C XML Schema.

name
Notation name, unqualified.

public
Public identifier, usually the content type.

system
System identifier, typically the location of a resource that could process the content type associated with the notation.

   

 

 

 

back to top