W3C home > Mailing lists > Public > www-tag@w3.org > February 2002

Re: PIs considered harmful Was: XML-SW, a thought experiment

From: Paul Prescod <paul@prescod.net>
Date: Tue, 12 Feb 2002 14:21:47 -0800
Message-ID: <3C69957B.49E1AC0B@prescod.net>
To: Tim Berners-Lee <timbl@w3.org>, "'www-tag'" <www-tag@w3.org>, Elliotte Rusty Harold <elharo@metalab.unc.edu>
Tim Berners-Lee wrote:
> PIs are indeed "useful in practice".  However, I feel they are harmful
> because they bypasss all the extensibility power one has with namespaces
> to make well-defined extentsions.

Make a convention that the PI target is a namespace.

> The idea of namespaces is that you can use one to define a new
> element to do just what you wanted to do with the PI, but you give
> it a URI name, and allow possibilities such as using existing tools
> for parsing and test for and converting them and so on.
> What is there which stops you using an element?

Simon is 100% right. If the schema designer did not foresee your need
for an extensibility element or attribute at a particular location then
you will not be able to validate your document if you introduce one. PIs
are ignored by the validator. You could make a universally invisible
element type called <xml:pi/> but what would that really accomplish?

> PIs are in concept a significant security liability, because different
> processors will
> process them differently, and so one will be able to make a document
> wheich will seem one thing in one case and another thing in another
> case, without the XML system being offically aware of it.

What does that mean? What is handling these PIs if not the "XML system"?
One XML application could handle the element <foo/> in one way and
another <foo/> in another way.

> I would agree with David and hope that PIs would be eliminated as soon as
> possible.

I have large-scale applications that depend on processing instructions.
The most recent is a commercially shipping product for a W3C member
company. To protect their privacy I'll mention instead a member that
makes heavy use of PIs that is not currently a customer, SoftQuad. They
use processing instructions to indicate where the current user's "caret"
is in the document, regardless of what schema, schema language,
vocabulary or DTD is in use. They also use it to point from the document
to the relevant stylesheet, as recommended by the W3C. It is all well
and good to deprecate processing instructions as a mind experiment but
now I need you to show me what alternative these applications have.
Magical comments?

Foolish consistency!

 Paul Prescod
Received on Tuesday, 12 February 2002 17:24:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:32:30 UTC