Processing instructions

W. Eliot Kimber eliot at isogen.com
Fri Aug 7 17:52:28 BST 1998


At 02:11 PM 8/7/98 +0100, Peter Jones wrote:
>Can anyone supply me with a plausible example of the use of processing
>instructions
><? PITargetAppName  p.i..p.i..p.i...?>

PIs are intended to be used to convey processor-specific messages to
processors. A typical use is to indicate transient formatting stuff to
composition engines, such as page breaks:

<?MyFormatter pagebreak ?>
<p>This has a page break before it</p>

Other typical examples are the PIs that the ADEPT*Editor product uses to
maintain information it needs, such as where the cursor was when you last
saved, local format overrides, and the like. These are all things that can
be discarded without significant loss and that are unique to the
ADEPT*Editor product, so they are appropriately managed with PIs.

As a rule, PIs are, by definition, stuff that can be removed without
affecting the content of the document (although it may affect its
processing by a particular application). 

Note that PIs have also been used as a substitute for formal markup
declarations (e.g., the XML declaration PI) because SGML does not provide a
way to declare new markup declaration types. 

PIs should *not* be used for things like creating hyperlinks or
use-by-reference relationships among documents, pulling in graphics, and
the like, unless those relationships are transient and specific to a
particular processor  (for example, ADEPT*Editor might use PIs to relate a
document to some ADEPT-specific configuration file).

Finally, note that elements, as well as PIs, can be governed by notations
simply by having an attribute of type NOTATION for the element:

<!DOCTYPE Equation [
<!NOTATION MyMath PUBLIC "+//IDN drmacro.com//NOTATION My Math//EN" >

<!ELEMENT Equation
  (#PCDATA)
>
<!ATTLIST Equation
  notation
    NOTATION
    (MyMathNotation) MyMathNotation
>
]>
<Equation>
This equation is governed by the MyMath notation
</Equation>

This is analogous to using notations as PI targets, the difference being
that the notation processor (the thing that implements the notation) gets
the element as its input rather than the PI.

Cheers,

Eliot
--
<Address HyTime=bibloc>
W. Eliot Kimber, Senior Consulting SGML Engineer
ISOGEN International Corp.
2200 N. Lamar St., Suite 230, Dallas, TX 75202.  214.953.0004
www.isogen.com
</Address>

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list