Notation declarations

An element or entity may contain non-XML format data. An element declaration must specify which formats may be embedded, and an entity declaration must specify which format is embedded. In both cases, this is done by referring to a notation name, which is defined in a notation declaration.

It should be noted that this feature was included in XML as part of its SGML inheritance, and that new applications of XML tend not to make use of it. Instead, non-XML data is usually included by reference from an attribute value, and the data format is identified using a MIME type, or even just the filename extent, as in '.gif'.

As with other declaration types, a notation declaration begins with the '<!' delimiter and ends with '>'. The keyword 'NOTATION' identifies a notation declaration, and is followed by the notation name, which is at the discretion of the DTD author but should be an obvious name for the format:

<!NOTATION TeX ..... >

Note

TEX is a typesetting language.


The notation name is followed by an external notation identifier, possibly involving both a public and a system identifier. If no information on the format is available, and no application is identifiable that can process the data, the declaration must be present in its minimum form, which includes a system identifier with no value (the keyword 'SYSTEM' followed by two quotes):

<!NOTATION PIXI SYSTEM "">

When an application is available that can process the data, the system identifier should specify the location and name of that application (though this approach may not work well across the Internet, where the location and name of the user's application will not be known in advance):

<!NOTATION TIFF SYSTEM "C:APPSSHOW_TIF.EXE">

Information about the data format should be provided, if present, in the public identifier:

<!NOTATION TeX PUBLIC "-//MyCorp//NOTATION TeX
                   Help File//EN" "C:APPSSHOW_TEX.EXE">

The declared notation may be referred to in entity declarations, following the 'NDATA' (notational data) keyword. Note that the parser can make no use of this information, but passes it to the application (which, it is hoped, can):



The declared notation may also be referred to in attribute declarations, for elements that contain formats other than XML (but conforming to legal XML character usage):



..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.216.174