Subject: Re: [xsl] Result still indented despite indent="no" From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Sat, 19 Feb 2005 23:59:30 -0800 (PST) |
Hello Dimitre, The sentence you are refering ("Initially , the set of whitespace-preserving element names contains all element names"), is part of algorithm description by the XSLT 1.0 spec, to implement xsl:strip-space and xsl:preserve-space instructions.. The complete paragraph is - "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. An element matches a NameTest if and only if the NameTest would be true for the element as an XPath node test. Conflicts between matches to xsl:strip-space and xsl:preserve-space elements are resolved the same way as conflicts between template rules (see [5.5 Conflict Resolution for Template Rules]). Thus, the applicable match for a particular element name is determined as follows: First, any match with lower import precedence than another match is ignored. Next, any match with a NameTest that has a lower default priority than the default priority of the NameTest of another match is ignored. It is an error if this leaves more than one match. An XSLT processor may signal the error; if it does not signal the error, it must recover by choosing, from amongst the matches that are left, the one that occurs last in the stylesheet. " The paragraph I cited from XSLT 1.0 spec in my original post, unambiguously defines rules for stripping text nodes - "A text node is preserved if any of the following apply: .... Otherwise, the text node is stripped" Later, spec suggests an algorithm for implementing xsl:strip-space and xsl:preserve-space (whose description contains the sentence you cited..) Regards, Mukul --- Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote: > It's better not only to "feel", but also to read > well. > > The spec also says just a few lines further: > > "Initially , the set of whitespace-preserving > element names contains > all element names." > > This, combined with rule 1) means that your > conclusion is contrary to > the rules established by the XSLT 1.0 spec. > > BTW, the exact link to the discussed rules is: > > > http://www.w3.org/TR/1999/REC-xslt-19991116#strip > > Cheers, > Dimitre Novatchev. __________________________________ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Result still indented des, Dimitre Novatchev | Thread | Re: [xsl] Result still indented des, Dimitre Novatchev |
[xsl] ANN: <XSLT:Wiki/> is now live, M. David Peterson | Date | Re: [xsl] Result still indented des, Dimitre Novatchev |
Month |