This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: error after attribute
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] error after attribute
- From: Oliver Becker <obecker at informatik dot hu-berlin dot de>
- Date: Thu, 14 Jun 2001 17:27:38 +0200 (MET DST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
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
by
<xsl:attribute name="ROLE">
<xsl:choose>
<!-- same as in your example -->
</xsl:choose>
</xsl:attribute>
Cheers,
Oliver
/-------------------------------------------------------------------\
| ob|do Dipl.Inf. Oliver Becker |
| --+-- E-Mail: obecker@informatik.hu-berlin.de |
| op|qo WWW: http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list