RE: [xml-dev] Re: I can XInclude where I [expletive deleted] want to

From
Elliotte Rusty Harold <>
To
Date
2002-04-30T14:13:00Z
ID
<p04330107b8f45412b571@[192.168.254.4]>
Thread
RE: [xml-dev] Re: I can XInclude where I [expletive deleted] want to
At 2:31 PM +0100 4/30/02, Michael Kay wrote:


>XSLT processors do not build source trees, so the question doesn't arise.
>

In other words anything that happens before the source tree is 
created is completely legal, no matter what. If I feed an XML file 
into Saxon, and Saxon changes all my rectangle elements into circle 
elements before it constructs the source tree, I have no claim that 
Saxon is nonconformant. That's a pretty radical interpretation of 
XSLT.

Essentially, this interpretation makes it impossible to do any 
conformance testing at all of XSLT processors. For instance, the 
OASIS test suite <http://www.oasis-open.org/committees/xslt/> would 
not be able to test any results at all because it starts with files 
instead of source trees, and it's perfectly OK for the construction 
process to do anything at all to those files before the transform 
begins. If it chooses to scramble the order of the input elements, or 
replace all attribute values with random text, or ROT-13 the PCDATA, 
that's all acceptable. None of these things could be called 
nonconformant.

>PS: the same arguments apply to the MSXML3 behaviour of stripping whitespace
>by default while building the tree. It's not the behaviour you might expect,
>but there's nothing in any of the specifications that stops them doing it.

I disagree. I think MSXML3 is nonconformant. In both cases a non-XSL 
transform is being applied to the input document before the XSL 
transform is applied. Thus the document that's transformed is not the 
document that was initially supplied.  I think that aside from a few 
=edge cases that aren't relevant here, the XSLT algorithm is 
deterministic, and we can take an XML input document, an XSLT 
stylesheet, apply the latter to the former, and expect a certain 
output. I think there is a function that maps XML documents onto 
XPath/XSLT data models/source trees and that any process that does 
not correctly implement that function is not conformant with XSLT.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold |  | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/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.cafeconleche.org/    |
+----------------------------------+---------------------------------+