[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Adding another layer of global styling

Subject: Adding another layer of global styling
From: Charles Muller <acmuller@xxxxxxx>
Date: Sat, 26 Jul 2003 14:20:30 +0900 (JST)
global styling
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@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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.