xsl-list
[Top] [All Lists]

[xsl] global language parameter

2010-02-13 10:41:58
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 kenkyū tō #722
7-3-1 Hongō, Bunkyō-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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>