RE: [xsl] xalan <xsl:element name="name()">

Subject: RE: [xsl] xalan <xsl:element name="name()">
From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx>
Date: Fri, 10 Oct 2003 08:31:01 -0600
> From: David.Pawson@xxxxxxxxxxx [mailto:David.Pawson@xxxxxxxxxxx]
> Sent: Friday, October 10, 2003 7:25 AM
> Subject: [xsl] xalan <xsl:element name="name()">
> A recent stylesheet I came across used
> <xsl:template match ="elname">
> <xsl:element name="name()">
>   .....
> Saxon spotted this as an error.
> The author told me that xalan hadn't reported this as an error.
> Any xalan users around to check this please?

Not sure what version of Xalan your correspondent used, but on v2.5.1d it
does return an error, as it should.  (How the error is handled is up to the
processor--it may simply report it, or leave the element out of the result
tree, but copy any child nodes.)

The value of the name attribute by definition is an AVT returning a valid
QName, so it should be written as:

<xsl:template match="elname">
<xsl:element name="{name()}">


| brian martinez                           brian.martinez@xxxxxxxxxxx |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services |

 XSL-List info and archive:

Current Thread