Re: PIFLE (was Re: Are PIs useful?)

Bert Bos wrote:
> Only if the document explicitly refers to a DTD, and then only if the
> element indeed doesn't match that DTD.

That's exactly the point. People can introduce PIs that work *across all
DTDs*. You'll notice that every XML DTD does not require a <?XML >
element.
 
> Why would that be different for a PI? There would be rules in the DTD
> that specify what can be in the PI, just as there are for the
> element. What's the use of a PI if it can contain anything you like?
> That's what comments are for (and literals, and #pcdata...)

A PI is an instruction to a *computer program*. An element is a
*description of content*. A comment is *text to be read by other human
beings about the encoding*. These should not be confused by computers or
people and so should have distinct syntaxes.

I know that there are some who think that it is acceptable to pretend
that instructions to computers are actually "comments" to other people.
Personally I think it is a gross hack. All languages should have "escape
mechanisms" like PIs so that these kinds of hacks are not necessary.
 
> We don't need an extension mechanism in XML. XML is one big extension
> mechanism already. You can create new tags to your heart's content.

Not if you have a DTD that you must conform to.

> But as long as XML doesn't have the notion of a "profile",
> communicating a profile will have to be done out-of-band. 

So??? XML as a profile of SGML is mostly described out-of-band too. You
seem to come to the conclusion that the current mechanism is fine after
your thinking out loud. Do you then agree that this is a reasonable use
of processing instructions?

 Paul Prescod

Received on Thursday, 15 May 1997 20:47:59 UTC