W3C home > Mailing lists > Public > xsl-editors@w3.org > January to March 1999

Comment regarding xsl:attribute

From: John Keinanen <john@ncompasslabs.com>
Date: Wed, 24 Feb 1999 17:37:41 -0800
Message-ID: <c=CA%a=_%p=Vancouver%l=ARGO-990225013741Z-22830@cliff.ncompasslabs.com>
To: "'xsl-editors@w3.org'" <xsl-editors@w3.org>

Concering section 2.7.2.3 "Creating Attributes with xsl:attribute" in
the
XSL specification, I find the following statement overly restrictive:

 * Including nodes other than text nodes in the value of an attribute; 
implementations may either signal the error or ignore the added nodes.

It seems useful to me to allow nodes within the xsl namespace to
be contained within xsl:attribute.  Especially xsl:text, xsl:counter,
and xsl:number.

In my particular case, I was hoping to create uniquely numbered 
identifiers using a counter.  Something like this:

<xsl:counter-reset name="myCounter">
<xsl:counter-increment name="myCounter">

<p>
<xsl:attribute name="id">myID<xsl:counter name="myCounter"
/></xsl:attribute>
Test
</p>

<xsl:counter-increment name="myCounter">

<p>
<xsl:attribute name="id">myID<xsl:counter name="myCounter"
/></xsl:attribute>
Test
</p>

would produce

<p id="myID1" />Test</p>
<p id="myID2" />Test</p>

Is there any compelling reason why elements such as xsl:text,
xsl:number,
and xsl:counter could not be legal children of the xsl:attribute
element?

And if this cannot be done, is there an equivalent legal alternative?

Thank you very much,

JOHN
john@ncompasslabs.com
Received on Wednesday, 24 February 1999 20:35:18 GMT

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