XML Schema Reference

Folder Left Edge Island Home Folder Right Edge
Folder Left Edge Components Online Reference Folder Right Edge
Folder Left Edge Text Page Complete Reference Folder Right Edge
Folder Left Edge Text Page W3C Recs Folder Right Edge
Folder Left Edge Examples Examples Folder Right Edge
Folder Left Edge ? Consulting & Training Folder Right Edge

The notation Element

The notation element represents a notation as defined by the W3C XML Recommendation. A notation provides a mechanism for an XML validator to locate external programs or processing instructions. An XML validator does not intrinsically validate notations. However, during validation of a corresponding XML instance, a notation must exist for each reference from an element or attribute whose corresponding (structure) type is the built-in NOTATION datatype.

Each notation must specify a system attribute, a public attribute, or both. The value of a system attribute frequently identifies a file, which might be a program. There is no requirement that the file exists on the parsing machine, or that the file exists at all. The value of a public attribute frequently identifies an external HTTP address. This URI might likewise represent a document or a program such as an Active Server Page (ASP) or JavaServer Page (JSP).

    <xsd:notation name="companyLogo"
                  system="com/company/graphics/companyLogo"
                  public="http://www.company.com/graphics/companyLogo"
                  id="notation.companyLogo">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                Location of the corporate logo.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:notation>

    <xsd:notation name="companyMascot"
                  system="com/company/graphics/companyMascot"
                  public="http://www.company.com/graphics/companyMascot"
                  id="notation.companyMascot">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                Location of the corporate mascot.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:notation>

Note that an element type may not directly reference a notation. An element type may only reference a derivation of NOTATION, which has enumerations. The value of each enumeration must be a notation.

    <xsd:element name="demoNotation">
        <xsd:simpleType>
            <xsd:restriction base="xsd:NOTATION">
                <xsd:enumeration value="companyLogo"/>
                <xsd:enumeration value="companyMascot"/>
            </xsd:restriction>
        </xsd:simpleType>
    </xsd:element>