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

RE: select attribute for xsl:attribute?

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Thu, 2 Jan 2003 18:00:53 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453DF06@daemsg02.software-ag.de>
To: "Clarke, Agnes" <Agnes_Clarke@nl.compuware.com>, xsl-editors@w3.org

We have considered from time to time adding a select attribute to
xsl:element and xsl:attribute in XSLT 2.0, the intention being that this
would create an element or attribute with the same type as the supplied
expression, rather than simply converting the value to a string. The current
situation is that we don't support this - the only way you can create a
typed value is by writing the string value and validating it, which ensures
that the type is consistent with the value. But we may provide such a
capability eventually, and we would want to reserve "select" to have this
meaning, rather than using it merely as a syntactic shorthand for the
existing XSLT 1.0 semantics.

Thanks for the comment.

Michael Kay

> -----Original Message-----
> From: Clarke, Agnes [mailto:Agnes_Clarke@nl.compuware.com] 
> Sent: 02 January 2003 12:16
> To: xsl-editors@w3.org
> Subject: select attribute for xsl:attribute?
> 
> 
> 
> Dear editors,
> 
> I find it (very slightly) frustrating that the xsl:attribute 
> element does not have a select attribute.
> 
> For example, I must type:
> 
>          <xsl:for-each select="$atts/*">
>             <xsl:attribute name="name()">
>                <xsl:value-of select="."/>
>             </xsl:attribute>
>          </xsl:for-each>
> 
> If $x = <att1>1</att1><att2>2</att2><att3>boo</att3>
> Then we get: <... att1="1" att2="2" att3="boo" ...>
> (This is a bit more dynamic then using xsl:attribute-set)
> 
> In an ideal world I could type:
> 
>          <xsl:for-each select="$atts/*">
>             <xsl:attribute name="name()" select="." />
>          </xsl:for-each>
> 
> The same applies to xsl:element...
> 
> Regards,
> 
> Agnes Clarke
> www.agslin.net
> 
> 
> -- 
> The contents of this e-mail are intended for the named 
> addressee only. It contains information that may be 
> confidential. Unless you are the named addressee or an 
> authorized designee, you may not copy or use it, or disclose 
> it to anyone else. If you received it in error please notify 
> us immediately and then destroy it. 
> 
Received on Thursday, 2 January 2003 12:01:01 GMT

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