Subject: Re: [xsl] global language parameter From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Sat, 13 Feb 2010 18:06:40 +0100 |
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.
It tried writing this way:
<xsl:template name="languageWrap"> <xsl:param name="contents"> <xsl:apply-templates/> </xsl:param>
<xsl:choose> <xsl:when test="@xml:lang='sa'">
<span style="font-family: 'Times Ext Roman'"> <xsl:copy-of select="$contents"/> </span> </xsl:when> <xsl:when test="@xml:lang='zh'"> <span style="font-family: Mincho,MingLiU, Batang, Simsun"> <xsl:copy-of select="$contents"/> </span> </xsl:when> <xsl:when test="@xml:lang='ko'"> <span style="font-family: Batang, BatangChe"> <xsl:copy-of select="$contents"/> </span> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$contents"/> </xsl:otherwise> </xsl:choose> </xsl:template>
But nothing happens in the generated HTML--there are no <span> tags generated at all in the document. Any suggestions as to what I should be looking for here?
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] global language parameter, G. Ken Holman | Thread | Re: [xsl] global language parameter, Charles Muller |
Re: [xsl] global language parameter, G. Ken Holman | Date | Re: [xsl] global language parameter, Charles Muller |
Month |