RE: [xsl] This can't be right, XML with no root element: Saxon & XT vs. Xalan

Subject: RE: [xsl] This can't be right, XML with no root element: Saxon & XT vs. Xalan
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 26 Jul 2001 17:01:25 +0100
> I've been evaluating Schematron. There is an example that
> tests for WAI
> conformance.  I've noticed that the validation transformation that it
> generates, does not use the text output mode, and yet it does not
> produce a root element, just text. So you get output like:
>
> <?xml version="1.0" encoding="utf-8"?>(1.1) An image element

The XSLT 1.0 specification is clear that the output does not have to be a
well-formed XML document, only a well-formed external general parsed entity.
Which means, in effect, something that would be a well-formed document if
you put a start and end tag around it. Whether you or I happen to like this
spec is somewhat irrelevant.

Mike Kay
Software AG


> should have
> some descriptive text: an alt or longdesc attribute.(1.1) An input
> element should have some descriptive text: an alt or longdesc
> attribute.
>
> { ...and so on...}
>
> The XSLT code is at the bottom of this document.
>
> XT and InstantSaxon 6.2.2 apply the transformation without
> error. Xalan
> 1.2 (via Cocoon 1.8.2) reacts thusly:
> "org.apache.xalan.xslt.XSLProcessorException: Warning: can't
> output text
> before document element! Ignoring... "
> Personally I'm with the Apache people on this one.
>
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread