[Home] [By Thread] [By Date] [Recent Entries]
Charles Muller wrote:
I'm taking my first stab at making a global parameter, through which I'd like to set font attributes for character sets of different languages. I'm using TEI-P5 with XSL 2, and I want my parameter to work with xml:lang. I am not sure I understand what you want to achieve without seeing the input XML and the output you want to create but your text above says "making a global" parameter while here you are defining a parameter that is local to your template named "languageWrap". A global parameter is defined as a child of the xsl:stylesheet element, not inside of a template, and is used to allow to pass in a value to the transformation that can be changed each time the transformation is run. You might want to use the 'lang' function http://www.w3.org/TR/xpath/#function-lang e.g. <xsl:when test="lang('sa')"> as that way you could check for the language defined on the context node or an ancestor while your check with @xml:lang only checks the context node.
Show us some context where you call the above template and where we can see what the context node is and which xml:lang value it has. -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|

Cart



