|
Subject: [xsl] Adding another layer of global styling From: Charles Muller <acmuller@xxxxxxx> Date: Sat, 26 Jul 2003 14:20:30 +0900 (JST) |
I have a set of combinations for various renderings of <title> according
to attributes and XPath position that handle titles through in my
articles and other documents and so forth that I write using TEI
(present code shown below).
I now want to add one more universal style application that should also
apply in other attribute situations when necessary: I want to apply the TITUS font
to all cases of <title lang="sa"> (Language = Sanskrit). I can't add
another <xsl:template match="title">, and I can't simply add it as an
choose/if/when option, since it is not simply an option, but a
document-wide application. I guess there must be a way of doing this.
TIA
Chuck
-------------------------------------
<xsl:template match="title">
<xsl:choose>
<xsl:when test="ancestor::listBibl">
<xsl:choose>
<xsl:when test="@level='m'">
<span style="font-style:italic">
<xsl:apply-templates/>. </span>
</xsl:when>
<xsl:when test="@level='j'">
<span style="font-style:italic">
<xsl:apply-templates/>.
</span>
</xsl:when>
<xsl:when test="@level='a'">
"<xsl:apply-templates/>."
</xsl:when>
<xsl:when test="@level='u'">
"<xsl:apply-templates/>."
</xsl:when>
<xsl:when test="@rend='bold'">
<span style="font-weight:bold"><xsl:apply-templates/></span>
</xsl:when>
<xsl:otherwise>
<span style="font-style:italic"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@level='m'">
<span style="font-style:italic"><xsl:apply-templates/></span>
</xsl:when>
<xsl:when test="@level='j'">
<span style="font-style:italic">
<xsl:apply-templates/></span>
</xsl:when>
<xsl:when test="@level='a'">
"<xsl:apply-templates/>"
</xsl:when>
<xsl:when test="@level='u'">
"<xsl:apply-templates/>"
</xsl:when>
<xsl:otherwise>
<span style="font-style:italic"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose></xsl:otherwise>
</xsl:choose>
</xsl:template>
---------------------------
Charles Muller <acmuller@xxxxxxx>
Faculty of Humanities, Toyo Gakuen University
Digital Dictionary of Buddhism and CJKV-English Dictionary [http://www.acmuller.net]
H-Buddhism List Editor [http://www.h-net.org/~buddhism/]
Mobile Phone: 090-9310-1787
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Can I suppress entity sub, Wendell Piez | Thread | Re: [xsl] Adding another layer of g, Wendell Piez |
| Re: [xsl] using variable in order a, Mukul Gandhi | Date | [xsl] Copying and updating selectiv, John Reid |
| Month |