Re: [xsl] error after attribute

Subject: Re: [xsl] error after attribute
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Jun 2001 17:27:38 +0200 (MET DST)
Hi Dave

>         <xsl:attribute name="ROLE" value="$role"/>
> With Saxon 6.3, I'm getting the error
> Error at xsl:attribute on line [the line with <xsl:attribute ... />] of
> file [this file]:
>   Attribute value is not allowed on this element

Yes, xsl:attribute doesn't have an attribute "value".

The correct syntax is
<xsl:attribute name="ROLE"><xsl:value-of select="$role" /></xsl:attribute>

BTW: I think you don't need to define a variable. The same could be achieved

<xsl:attribute name="ROLE">
      <!-- same as in your example -->


|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW: |

 XSL-List info and archive:

Current Thread