Lists Home |
Date Index |
I sometimes use processing instructions in a source document as instructions
to a stylesheet, for example
One could of course use an element just as well; but that means changing the
schema/DTD, which one might have no control over.
This is not really something I would recommend: it's very likely that other
applications designed to process XML conforming to this schema will fall
over when they encounter this undocumented PI. But it can be handy all the
In fact, I can't think of any uses of PIs that I would recommend, given the
lack of namespace support and the lack of schema support.
> -----Original Message-----
> From: Vladimir Gapeyev [mailto:firstname.lastname@example.org]
> Sent: 09 May 2005 03:33
> To: email@example.com
> Subject: [xml-dev] Well-established uses of processing instructions?
> I am curious to know to what uses have people put XML processing
> instructions. I am more interested in those that have a "community"
> around them (manifesting itself by a de jure or a de facto
> standard, or
> multiple applications that understand the PI, or large amount
> of document
> instances with unrelated authorship) rather than in made-up samples,
> however plausible they are. Any pointers?
> After some search, I am aware of just a couple instances:
> (1) http://www.w3.org/TR/xml-stylesheet/ -- W3C
> Recommendation of 1999 on
> Associating Style Sheets with XML documents. How much is this Rec
> important for non-HTML XML documents? (For (X)HTML, the <LINK
> REL="stylesheet"> element appears to be a better solution.)
> (2) It appears Apache project Cocoon-1 used PIs, but Cocoon-2
> switched to
> a more flexible model where association between an XML document and a
> processor is specified by a third, separate, document
> Thanks for any help,
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>