home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _E8DB11BA7A424C91843E4AF6B4BCACAA < prev    next >
Encoding:
Extensible Markup Language  |  2002-09-04  |  3.0 KB  |  81 lines

  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3.                 version='1.0'>
  4.  
  5. <!-- ********************************************************************
  6.      $Id: html.xsl,v 1.1.2.1 2002/09/04 13:50:32 jdj Exp $
  7.      ********************************************************************
  8.  
  9.      This file is part of the XSL DocBook Stylesheet distribution.
  10.      See ../README or http://nwalsh.com/docbook/xsl/ for copyright
  11.      and other information.
  12.  
  13.      ******************************************************************** -->
  14.  
  15. <xsl:template name="anchor">
  16.   <xsl:param name="node" select="."/>
  17.   <xsl:param name="conditional" select="1"/>
  18.   <xsl:variable name="id">
  19.     <xsl:call-template name="object.id">
  20.       <xsl:with-param name="object" select="$node"/>
  21.     </xsl:call-template>
  22.   </xsl:variable>
  23.   <xsl:if test="$conditional = 0 or $node/@id">
  24.     <a name="{$id}"/>
  25.   </xsl:if>
  26. </xsl:template>
  27.  
  28. <xsl:template name="href.target.uri">
  29.   <xsl:param name="context" select="."/>
  30.   <xsl:param name="object" select="."/>
  31.   <xsl:text>#</xsl:text>
  32.   <xsl:call-template name="object.id">
  33.     <xsl:with-param name="object" select="$object"/>
  34.   </xsl:call-template>
  35. </xsl:template>
  36.  
  37. <xsl:template name="href.target">
  38.   <xsl:param name="context" select="."/>
  39.   <xsl:param name="object" select="."/>
  40.   <xsl:text>#</xsl:text>
  41.   <xsl:call-template name="object.id">
  42.     <xsl:with-param name="object" select="$object"/>
  43.   </xsl:call-template>
  44. </xsl:template>
  45.  
  46. <xsl:template name="dingbat">
  47.   <xsl:param name="dingbat">bullet</xsl:param>
  48.   <xsl:call-template name="dingbat.characters">
  49.     <xsl:with-param name="dingbat" select="$dingbat"/>
  50.   </xsl:call-template>
  51. </xsl:template>
  52.  
  53. <xsl:template name="dingbat.characters">
  54.   <!-- now that I'm using the real serializer, all that dingbat malarky -->
  55.   <!-- isn't necessary anymore... -->
  56.   <xsl:param name="dingbat">bullet</xsl:param>
  57.   <xsl:choose>
  58.     <xsl:when test="$dingbat='bullet'">•</xsl:when>
  59.     <xsl:when test="$dingbat='copyright'">©</xsl:when>
  60.     <xsl:when test="$dingbat='trademark'">™</xsl:when>
  61.     <xsl:when test="$dingbat='trade'">™</xsl:when>
  62.     <xsl:when test="$dingbat='registered'">®</xsl:when>
  63.     <xsl:when test="$dingbat='service'">(SM)</xsl:when>
  64.     <xsl:when test="$dingbat='nbsp'"> </xsl:when>
  65.     <xsl:when test="$dingbat='ldquo'">“</xsl:when>
  66.     <xsl:when test="$dingbat='rdquo'">”</xsl:when>
  67.     <xsl:when test="$dingbat='lsquo'">‘</xsl:when>
  68.     <xsl:when test="$dingbat='rsquo'">’</xsl:when>
  69.     <xsl:when test="$dingbat='em-dash'">—</xsl:when>
  70.     <xsl:when test="$dingbat='mdash'">—</xsl:when>
  71.     <xsl:when test="$dingbat='en-dash'">–</xsl:when>
  72.     <xsl:when test="$dingbat='ndash'">–</xsl:when>
  73.     <xsl:otherwise>
  74.       <xsl:text>•</xsl:text>
  75.     </xsl:otherwise>
  76.   </xsl:choose>
  77. </xsl:template>
  78.  
  79. </xsl:stylesheet>
  80.  
  81.