This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: error after attribute


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]