Jeni Tennison reopens
the debate about Processing Instructions (PIs )on xml-dev by proposing to
define guidelines for using them.
Although part of the XML 1.0 recommendation, and used to associate
stylesheets to XML documents, PIs have been ignored by most of the other W3C
specifications.
Considered for defining namespaces, their usage has been rejected in favor
of the attributes based syntax which we currently use. W3C XML Schema has not only
preferred to use attributes for its needs (for instance to locate relevant
schemas in instance documents) but even defined a specific element
(xs:annotation) to avoid users using PIs for their own needs in
schemas.
PIs appear thus to be banned from official specifications.
The first answers to Tennison's question seem to prove that there is
nevertheless a strong need for PIs to carry information kept hidden from
traditional applications:
- Tommie Usdin uses
them in sample documents to tag the sections needing to be included in
documentation.
- Rick Jelliffe uses
them in publishing is to add soft and hard breaks for a particular
production run.
- Michael Kay uses
them as markers to include generated content such as a table of contents or
glossary.
One of the strengths of PIs is that they are ignored by XML schema languages (except by
Schematron, by which they are still ignored unless specifically specified) and
together with comments they are the last feature which keeps XML extensible when
closed schemas are published.
|