| Subject: Re: [xsl] Adding another layer of global styling From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Sat, 26 Jul 2003 15:11:38 -0400 | 
<xsl:template name="Sanskrit-wrap">
  <xsl:choose>
    <xsl:when test="@lang = 'sa'">
      <span style="font-family: 'Titus'">
        <xsl:apply-templates/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template><xsl:template name="Sanskrit-wrap">
  <xsl:param name="contents">
    <xsl:apply-templates/>
  </xsl:param>
  <xsl:choose>
    <xsl:when test="@lang = 'sa'">
      <span style="font-family: 'Titus'">
        <xsl:copy-of select="$contents"/>
      </span>
    </xsl:when>
    <xsl:otherwise>
      <xsl:copy-of select="$contents"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template><xsl:template match="title">
  <xsl:call-template name="Sanskrit-wrap">
    <xsl:with-param name="contents">
      <xsl:choose>
        <xsl:when test="ancestor::listBibl">
           <xsl:choose>
             <xsl:when test="@level='m' or @level='j'">
                <xsl:call-template name="italicize">
                  <xsl:with-param name="contents">
                    <xsl:apply-templates/>. <xsl:text/>
                  </xsl:with-param>
                </xsl:call-template>
             </xsl:when>
             <xsl:when test="@level='a' or @level='u'">
                <xsl:call-template name="quote">
                  <xsl:with-param name="contents">
                    <xsl:apply-templates/>.<xsl:text/>
                  </xsl:with-param>
                </xsl:call-template>
             </xsl:when>
             <xsl:when test="@rend='bold'">
                <xsl:call-template name="embolden"/>
             </xsl:when>
             <xsl:otherwise>
                <xsl:call-template name="italicize"/>
             </xsl:otherwise>
           </xsl:choose>
         </xsl:when>
         <xsl:otherwise>
           <xsl:choose>
             <xsl:when test="@level='a' or @level='u'">
               <xsl:call-template name="quote"/>
             </xsl:when>
             <xsl:otherwise>
               <xsl:call-template name="italicize"/>
             </xsl:otherwise>
           </xsl:choose>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:with-param>
   </xsl:call-template>
</xsl:template>Cheers, Wendell
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
___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "Thus I make my own use of the telegraph, without consulting the directors, like the sparrows, which I perceive use it extensively for a perch." -- Thoreau
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| [xsl] Adding another layer of globa, Charles Muller | Thread | Re: [xsl] Adding another layer of g, Charles Muller | 
| Re: [xsl] Can I suppress entity sub, Wendell Piez | Date | [xsl] encoding and NCRs; source doc, Mike Brown | 
| Month |