[
Lists Home |
Date Index |
Thread Index
]
Jeni Tennison wrote:
>
> I'm trying to put together some guidelines about when we should use
> processing instructions and when some other construct (e.g. empty
> element, namespaced attribute) to pass information to an application.
I mostly use PIs for instructions to applications that
are vocabulary-independant.
<?xml-stylesheet?> is a good example of this: an XSLT
processor can operate on any kind of source document,
as long as it can find an appropriate stylesheet.
PIs can be added to any kind of source document,
so that's a good place to have XSLT processors
look for links to stylesheets.
Another example: I have a small SGML-aware spellchecker,
which basically just extracts the text and feeds it
to ispell, but also knows how to ignore things like
code listings. I use one PI in DTDs to tell the
spellchecker which element types to skip, and another
in instances to add words to the spellchecker's dictionary.
Architectural form declarations are another example.
> [...]
>
> Despite the fact that the XML Rec. suggests using notations to specify
> the legal names of PIs, I haven't actually seen that in use. Anyone
> think that it's good practice?
I've never seen the point. The only data associated with a
NOTATION is the system identifier (which is useless)
and public identifier (also useless).
Besides which, <!NOTATION...> declarations can only appear
inside the DTD, which is all about vocabulary-specific stuff.
Since as above I mostly use PIs for vocabulary-independent stuff,
<!NOTATION...> declarations for PI targets would be redundant.
--Joe English
jenglish@flightlab.com
|