W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 1999

Multiple xsl:strip-space and xsl:preserve-space declarations

From: Kay Michael <Michael.Kay@icl.com>
Date: Fri, 10 Dec 1999 10:25:23 -0000
Message-ID: <93CB64052F94D211BC5D0010A800133101FDE87B@wwmess3.bra01.icl.co.uk>
To: "'xsl-editors@w3.org'" <xsl-editors@w3.org>
The spec (section 3.4) is very confusing in this area.

The definition comes in two parts. The first part appears to describe an
algorithm: "initially the set of whitespace-preserving names contains all
names, if an element matches an xsl:strip-space it is removed from the list,
if it matches an xsl:preserve-space it is added to the list". The suggestion
is that these rules are applied sequentially, with the implication that if I
write

<xsl:strip-space elements="title"/>
<xsl:preserve-space elements="title"/>

(in either order) then whitespace will be preserved for the title element.

But then the spec goes on to talk about conflict resolution in terms of
rules having precedence and priority, and this part of the spec suggests
that the above is an error, which the implementor can either report or
recover from, and if he chooses to recover, then the order of declarations
is significant. Further, the spec doesn't define what it means by
"conflict", it doesn't say whether

<xsl:strip-space elements="title title"/>

is a conflict, or whether
 
<xsl:strip-space elements="title"/>
<xsl:strip-space elements="title"/>

is a conflict; the fact that conflict resolution it is defined by reference
to template rules suggests that it is a conflict, because there is no
suggestion with template rules that a conflict doesn't arise if two
templates have the same effect.

I can't reconcile the algorithmic part of the specification with the
rule-based part at all. They give quite different answers.

Mike Kay
Received on Friday, 10 December 1999 05:25:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:49 GMT