[xsl] global language parameter

Subject: [xsl] global language parameter
From: Charles Muller <cmuller-lst@xxxxxxxxxxxxxxx>
Date: Sun, 14 Feb 2010 01:41:24 +0900
Greetings:

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?


Regards,

Chuck
--
-------------------

A. Charles Muller

University of Tokyo
Graduate School of Humanities and Sociology, Faculty of Letters
Center for Evolving Humanities
Akamon kenkyE+ tE
#722
7-3-1 HongE
, BunkyE
-ku
Tokyo 113-0033, Japan

Web Site: Resources for East Asian Language and Thought
http://www.acmuller.net

<acmuller[at]jj.em-net.ne.jp>

Mobile Phone: 090-9310-1787

Current Thread