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

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

From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
Date: Sat, 23 Feb 2002 22:37:03 -0500
Message-Id: <p04330104b89e0d8fcad2@[]>
To: "'www-tag'" <www-tag@w3.org>
At 5:21 PM -0800 2/23/02, Piotr Kaminski wrote:

>My point:  you can't have it both ways.  Either PIs are out-of-band, and
>not part of the main document's schema (what the original proponents
>wanted, I believe), or they are validated by the schema, in which case we
>might as well use normal elements.

My point is that you most certainly can have it both ways. Most 
schema languages do not validate processing instructions. Other 
hypothetical schema languages may choose to do so. Currently 
Schematron is the only one I know of that could plausibly do this, if 
the schema author chose. (Schematron is liberal: everything not 
forbidden is permitted. If you don't specifically exclude PIs, then 
they're allowed.)  You can use N schemas written in M languages if it 
seems useful to do so. Some of these may ignore PIs. Some may 
validate PIs. Some may only validate PIs.

There's an extreme Aristotelian tendency in the XML world that tries 
to lock everything down and insist that there's only one way to do 
it, that all documents must adhere to a schema, that there can be 
only one schema per document, and even that there can be only one 
schema language. The assumption is that validity is a boolean, i.e. 
either true or false, and that a document cannot be both valid and 
invalid at the same time; and furthermore that invalid documents are 
incorrect. In practice, though, that's not what XML is about. X 
stands for Extensible. Decisions about whether and which schemas to 
use for what purposes are completely up to the local processing 
environment. Choose the schemas that seem useful to you. In choosing 
schema A in language, you in no way rule out either yourself or 
myself using schema B in language Y. And these different schemas may 
not be at all equivalent. They may not come to the same conclusions 
about document validity, and they may not assign the same types to 
the same elements. XMl is not Aristotelian. It's fuzzy, and that's 
part of its power and its usefulness.

| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
Received on Saturday, 23 February 2002 22:41:12 UTC

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