[xsl] global language parameter

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

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:when test="@xml:lang='sa'">
       <span style="font-family: 'Times Ext Roman'">
         <xsl:copy-of select="$contents"/>
    <xsl:when test="@xml:lang='zh'">
       <span style="font-family: Mincho,MingLiU, Batang, Simsun">
         <xsl:copy-of select="$contents"/>
    <xsl:when test="@xml:lang='ko'">
       <span style="font-family: Batang, BatangChe">
         <xsl:copy-of select="$contents"/>
       <xsl:copy-of select="$contents"/>

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?



A. Charles Muller

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

Web Site: Resources for East Asian Language and Thought


Mobile Phone: 090-9310-1787

Current Thread