[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] About validating post xsl
Subject: RE: [xsl] About validating post xsl From: "Dion Houston" <dionh@xxxxxxxxxxxxxxxxxxxxx> Date: Thu, 12 Dec 2002 14:02:23 -0800 |
> > If you choose XML output, and have not used disable-output-escaping, > > the serialized result will be well-formed, always. - Well, hate to be a bit nitpicky (I know you know this), but just to be explicit, you need to have a single root element in order for it to be well-formed. The following is a legal stylesheet is it not? <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <Foo/> <Bar/> </xsl:template> </xsl:stylesheet> But you would certainly not say the result is well-formed :) Cheers! Dion -----Original Message----- From: Mike Brown [mailto:mike@xxxxxxxx] Sent: Thursday, December 12, 2002 1:27 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] About validating post xsl Dimitre Novatchev wrote: > Mike Brown wrote: > > If you choose XML output, and have not used disable-output-escaping, > > the serialized result will be well-formed, always. > > Hmm... Only in some cases. Here's what the spec says: > > "The xml output method outputs the result tree as a well-formed XML > external general parsed entity. If the root node of the result tree has > a single element node child and no text node children, then the entity > should also be a well-formed XML document entity" I said you will get well-formed output. The section of the spec you quoted says that you either get a well-formed "external general parsed entity" or you get a well-formed "document entity". Both are well-formed. There is no contradiction here. You are right about the former type of entity not being validatable. My first message ("certainly") was imprecise in this regard. But the second message, in which I said the validatability of the result depends on what logical content the stylesheet author said to produce, was correct, AFAIK. There's nothing that happens during serialization that would affect validation, is there? As long as the result tree represents the correct XML, and the XML output method is used... Mike -- Mike J. Brown | http://skew.org/~mike/resume/ Denver, CO, USA | http://skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] About validating post xsl, Mike Brown | Thread | RE: [xsl] About validating post xsl, Michael Kay |
[xsl] accessing individual nodes wh, NIENKE, Bill P. - AC | Date | [xsl] flat tree to expanded tree, bix xslt |
Month |