xsl-list
[Top] [All Lists]

Adding another layer of global styling

2003-07-25 22:20:30
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'">
&quot;<xsl:apply-templates/>.&quot;
  </xsl:when>
<xsl:when test="@level='u'">
&quot;<xsl:apply-templates/>.&quot;
  </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'">
&quot;<xsl:apply-templates/>&quot; 
  </xsl:when>
<xsl:when test="@level='u'">
&quot;<xsl:apply-templates/>&quot; 
  </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(_at_)gol(_dot_)com>
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



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