RE: select attribute for xsl:attribute?

"Kay, Michael" <[email protected]>
Newsgroups gmane.org.w3c.xsl-editors
Message-ID <[email protected]>
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:[email protected]] 
> Sent: 02 January 2003 12:16
> To: [email protected]
> 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. 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.