[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] global language parameter


Subject: Re: [xsl] global language parameter
From: Charles Muller <cmuller-lst@xxxxxxxxxxxxxxx>
Date: Sun, 14 Feb 2010 10:18:08 +0900

Martin Honnen 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.

It tried writing this way:

<xsl:template name="languageWrap">
   <xsl:param name="contents">
     <xsl:apply-templates/>
   </xsl:param>

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.

Ken's response, together with this, exposes the fact that I don't really know what I am doing here.


My understanding of the notion of "global parameter" was that of a style that could be applied to any content element (in, for example, Chinese) throughout my XML document, regardless of whether it was <p xml:lang="zh">, <item xml:lang="zh">, <term xml:lang="zh">, <ref xml:lang="zh">, etc. In other words, I could just write the style declaration for this once at the top of my style sheet, and not have to write it separately at each element.

Perhaps I am using the wrong terminology? Or attempting something that can't be done?

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
Keywords