W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > May 1997

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

From: Bert Bos <bbos@mygale.inria.fr>
Date: Thu, 15 May 1997 22:52:33 +0200 (MET DST)
Message-Id: <199705152052.WAA03288@mygale.inria.fr>
To: Paul Prescod <papresco@calum.csclub.uwaterloo.ca>
Cc: w3c-sgml-wg@w3.org
Paul Prescod writes:
 > Bert Bos wrote:
 > > If you have
 > > 
 > >     <?my-info foo="bar" q="8"?>
 > > 
 > > why not change it to
 > > 
 > >     <my-info foo="bar" q="8"/>
 > > 
 > > Is there any difference in what a parser hands to the application? 
 > Yes. In the first case it hands "(type: PI, target:my-info, foo:bar,
 > q:8). In the second it hands (***VALIDITY ERROR*** THIS DOCUMENT DOES
 > NOT CONFORM TO ITS DTD***) and pops up an error message and perhaps
 > halts the transfer of medical information that was underway.

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

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...)

(Note: by "DTD" I mean the whole set of constraints on the format,
including, but much more than what can be specified in SGML-DTD

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.

 > Big difference.
 > > So how is it possible that PIs are still in the draft? I think that
 > > all the people that said "I don't use them..."  thought that there
 > > actually were other people that did. And nobody asked for a show of
 > > hands.
 > We all use them: every single XML user does. XML could not exist as it
 > does today if it were not for PIs in SGML. We would have had to declare
 > "implicit elements" and tromp on the user's namespace and on SGML
 > compatibility for the XML declaration. User PI's similarly belong *in*
 > XML because ten years from now some sub-group of some organization will
 > want to make an application profile *of* XML.

Thinking aloud here:

That's an interesting point. I expect there will indeed be many
applications that have additional constraints on the format of their
XML documents, and it is likely that those constraints cannot be
expressed in a DTD, using the current syntax.

But as long as XML doesn't have the notion of a "profile",
communicating a profile will have to be done out-of-band. A PI doesn't
mean anything to anybody, unless (1) the XML spec says what it means,
or (2) people exchanging XML agree on what it means (i.e.,

Note that the <?xml...?> at the top *doesn't* establish the XML
profile for SGML tools (assuming they can read XML). SGML tools simply
don't know what a PI means. SGML may be modified by TC4 so that an
occurrence of <?SGML some-fpi?> at the top does indicate a profile,
but currently it doesn't.

If you want to support profiles of XML, you'll have to add it to the
spec *now* and you have to state that <?something... some-url?> is
defined by XML to mean the profile with global identifier `some-url'.

The `some-url' can point to the user-manual of the profile, or just to
nothing at all. I don't think it will be possible to invent a formal
syntax for profiles.

On the other hand, given that profiles will not be machine readable
anyway, why not stick with the out-of-band solution: it's one less
thing to worry about for XML implementers.

  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/pub/WWW/People/Bos/                      INRIA/W3C
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 4 93 65 77 71               06902 Sophia Antipolis Cedex, France
Received on Thursday, 15 May 1997 16:52:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:26 UTC