Subject: Re: [xsl] Result still indented despite indent="no" From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Sun, 20 Feb 2005 09:32:11 -0800 (PST) |
Hi David, You are citing this sentence from section 3.4 - "Initially, the set of whitespace-preserving element names contains all element names." As I earlier said! This sentence is part of algorithm description by the spec, that how xsl:strip-space and xsl:preserve-space should be implemented, and should be read in that context. The complete paragraph is.. (I have marked this sentence between >>>> <<<<) For source documents, the set of whitespace-preserving element names is specified by xsl:strip-space and xsl:preserve-space top-level elements. These elements each have an elements attribute whose value is a whitespace-separated list of NameTests. >>>>Initially, the set of whitespace-preserving element names contains all element names<<<<. If an element name matches a NameTest in an xsl:strip-space element, then it is removed from the set of whitespace-preserving element names. If an element name matches a NameTest in an xsl:preserve-space element, then it is added to the set of whitespace-preserving element names. I might be wrong. looks like :) But in that case, the spec should be a bit more clear.. It should clearly say, what should happen, when both strip-space and preserve-space are not present. Whether default behaviour should be to preserve white spaces or strip white spaces. Regards, Mukul --- David Carlisle <davidc@xxxxxxxxx> wrote: > Mukul, > > as Michael says you don't need the errata in this > case, section 3.4 is > not at all ambiguous here it says: > > > > > Initially, the set of whitespace-preserving > element names contains all > > element names. > > so unless you specify strip-space in your stylesheet > all white space in > the source is preserved. > > This behaviour is implemented in all xslt engines > that I have seen > (including msxsl) so I don't think that there is any > reason to doubt > that this is clear. > > The difference in msxml is not in the implementation > of xsl strip-space > it is in the parser producing the input tree before > xslt starts. msxml > removes white space (irrespective of xsl:strip-space > or xsl:preseve > space, the xsl instructions can only affect the > input tree as seen by > xsl and in the case of msxml the input tree has > essentially gone through > a pre-transformation that has removed space. If you > set the > preservewhitepace property so that the parser does > not do that, you'll > see that msxml implements xsl space stripping in a > conformant way. > > David __________________________________ Do you Yahoo!? All your favorites on one personal page Try My Yahoo! http://my.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Result still indented des, David Carlisle | Thread | Re: [xsl] Result still indented des, Mukul Gandhi |
Re: [xsl] Result still indented des, David Carlisle | Date | Re: [xsl] Result still indented des, Mukul Gandhi |
Month |