XSLT: Adding optional select attribute to xsl:copy

It would be useful to optionally add a select attribute to xsl:copy,
especially if (as with copy-of) if it could be used for shallow copies
of a number of elements during pull-style processing

For example, instead of writing

<xsl:for-each select="book">
   <xsl:copy>
     <xsl:copy-of select="title"/>
     <xsl:copy-of select="publisher"/>
   </xsl:copy>
</xsl:for-each>

it would be more succint to simply write

<xsl:copy select="book">
   <xsl:copy-of select="title"/>
   <xsl:copy-of select="publisher"/>
</xsl:copy>

Received on Wednesday, 4 June 2003 13:52:51 UTC