Changeset 90bfa70


Ignore:
Timestamp:
01/19/2005 07:17:44 PM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Children:
c2913ea
Parents:
dc6acb5
Message:

Added support for <link xlink:href=...

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@4545 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/xhtml/lfs-mixed.xsl

    rdc6acb5 r90bfa70  
    33<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    44                xmlns="http://www.w3.org/1999/xhtml"
     5                xmlns:xlink="http://www.w3.org/1999/xlink"
    56                version="1.0">
    67
     
    7475
    7576    <!-- External URLs in italic font -->
    76   <xsl:template match="ulink" name="ulink">
    77     <a>
    78       <xsl:if test="@id">
    79         <xsl:attribute name="id">
    80           <xsl:value-of select="@id"/>
    81         </xsl:attribute>
    82       </xsl:if>
    83       <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
    84        <i>
    85         <xsl:choose>
    86           <xsl:when test="count(child::node())=0">
    87             <xsl:value-of select="@url"/>
    88           </xsl:when>
    89           <xsl:otherwise>
    90             <xsl:apply-templates/>
    91           </xsl:otherwise>
    92         </xsl:choose>
    93       </i>
    94     </a>
     77  <xsl:template match="link" name="ulink">
     78    <xsl:choose>
     79      <xsl:when test="@xlink:href">
     80        <a>
     81          <xsl:if test="@xml:id">
     82            <xsl:attribute name="id">
     83              <xsl:value-of select="@xnl:id"/>
     84            </xsl:attribute>
     85          </xsl:if>
     86          <xsl:attribute name="href"><xsl:value-of select="@xlink:href"/></xsl:attribute>
     87          <i>
     88            <xsl:choose>
     89              <xsl:when test="count(child::node())=0">
     90                <xsl:value-of select="@xlink:href"/>
     91              </xsl:when>
     92              <xsl:otherwise>
     93                <xsl:apply-templates/>
     94              </xsl:otherwise>
     95            </xsl:choose>
     96          </i>
     97        </a>
     98      </xsl:when>
     99      <xsl:otherwise>
     100        <xsl:call-template name="link"/>
     101      </xsl:otherwise>
     102    </xsl:choose>
    95103  </xsl:template>
    96104 
Note: See TracChangeset for help on using the changeset viewer.