[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Param test in mode argument
The spec says that mode must be set to a 'QName', thus the value may only start with letter, digit and certain other characters (though not a '$'). Saxon reports this as an error indicating that the name contains invalid characters which seems reasonable. Oracle just gets on with the job and ignores the apply-templates. In short, you can't use a variable (either via an attribute value template or not) for this particular attribute. I would guess that the most likely workaround is a choose/when etc. with fixed mode values specified for each apply-templates instruction. My understanding is that attributes that refer to objects within the stylesheet cannot be variables as the value must be known when the stylesheet is read. Whilst the mode does not directly reference a template it does qualify the template to use. Regards Nick Browne Slipstone Ltd P Boichat wrote: > Hi, > > Is there any reason why I am unable to apply a template using a mode > argument that is obtained from a passed parameter i.e. > > <xsl:param name="myparam" select="thisone"/> > > <xsl:apply templates select="mynode" mode="$myparam"> > > <xsl:template match="mynode" mode="thisone"> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|