home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _702333DF07B14EC3900B90F1B91F44D0 < prev    next >
Encoding:
Extensible Markup Language  |  2002-09-04  |  5.6 KB  |  163 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: pi.xsl,v 1.1.2.1 2002/09/04 14:25:35 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 match="processing-instruction()">
  16. </xsl:template>
  17.  
  18. <!-- ==================================================================== -->
  19.  
  20. <xsl:template name="dbfo-attribute">
  21.   <xsl:param name="pis" select="processing-instruction('dbfo')"/>
  22.   <xsl:param name="attribute">filename</xsl:param>
  23.  
  24.   <xsl:call-template name="pi-attribute">
  25.     <xsl:with-param name="pis" select="$pis"/>
  26.     <xsl:with-param name="attribute" select="$attribute"/>
  27.   </xsl:call-template>
  28. </xsl:template>
  29.  
  30. <xsl:template name="dbfo-filename">
  31.   <xsl:param name="pis" select="./processing-instruction('dbfo')"/>
  32.   <xsl:call-template name="dbfo-attribute">
  33.     <xsl:with-param name="pis" select="$pis"/>
  34.     <xsl:with-param name="attribute">filename</xsl:with-param>
  35.   </xsl:call-template>
  36. </xsl:template>
  37.  
  38. <xsl:template name="dbfo-dir">
  39.   <xsl:param name="pis" select="./processing-instruction('dbfo')"/>
  40.   <xsl:call-template name="dbfo-attribute">
  41.     <xsl:with-param name="pis" select="$pis"/>
  42.     <xsl:with-param name="attribute">dir</xsl:with-param>
  43.   </xsl:call-template>
  44. </xsl:template>
  45.  
  46. <!-- ==================================================================== -->
  47.  
  48. <xsl:template name="process.cmdsynopsis.list">
  49.   <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
  50.   <xsl:param name="count" select="1"/>
  51.  
  52.   <xsl:choose>
  53.     <xsl:when test="$count>count($cmdsynopses)"></xsl:when>
  54.     <xsl:otherwise>
  55.       <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
  56.  
  57.        <dt>
  58.        <a>
  59.          <xsl:attribute name="href">
  60.            <xsl:call-template name="object.id">
  61.              <xsl:with-param name="object" select="$cmdsyn"/>
  62.            </xsl:call-template>
  63.          </xsl:attribute>
  64.  
  65.          <xsl:choose>
  66.            <xsl:when test="$cmdsyn/@xreflabel">
  67.              <xsl:call-template name="xref.xreflabel">
  68.                <xsl:with-param name="target" select="$cmdsyn"/>
  69.              </xsl:call-template>
  70.            </xsl:when>
  71.            <xsl:otherwise>
  72.              <xsl:apply-templates select="$cmdsyn" mode="xref-to">
  73.                <xsl:with-param name="target" select="$cmdsyn"/>
  74.              </xsl:apply-templates>
  75.            </xsl:otherwise>
  76.          </xsl:choose>
  77.        </a>
  78.        </dt>
  79.  
  80.         <xsl:call-template name="process.cmdsynopsis.list">
  81.           <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
  82.           <xsl:with-param name="count" select="$count+1"/>
  83.         </xsl:call-template>
  84.       </xsl:otherwise>
  85.     </xsl:choose>
  86. </xsl:template>
  87.  
  88. <xsl:template match="processing-instruction('dbcmdlist')">
  89.   <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
  90.  
  91.   <xsl:if test="count($cmdsynopses)<1">
  92.     <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
  93.     </xsl:message>
  94.   </xsl:if>
  95.  
  96.   <dl>
  97.     <xsl:call-template name="process.cmdsynopsis.list">
  98.       <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
  99.     </xsl:call-template>
  100.   </dl>
  101. </xsl:template>
  102.  
  103. <!-- ==================================================================== -->
  104.  
  105. <xsl:template name="process.funcsynopsis.list">
  106.   <xsl:param name="funcsynopses"/><!-- empty node list by default -->
  107.   <xsl:param name="count" select="1"/>
  108.  
  109.   <xsl:choose>
  110.     <xsl:when test="$count>count($funcsynopses)"></xsl:when>
  111.     <xsl:otherwise>
  112.       <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
  113.  
  114.        <dt>
  115.        <a>
  116.          <xsl:attribute name="href">
  117.            <xsl:call-template name="object.id">
  118.              <xsl:with-param name="object" select="$cmdsyn"/>
  119.            </xsl:call-template>
  120.          </xsl:attribute>
  121.  
  122.          <xsl:choose>
  123.            <xsl:when test="$cmdsyn/@xreflabel">
  124.              <xsl:call-template name="xref.xreflabel">
  125.                <xsl:with-param name="target" select="$cmdsyn"/>
  126.              </xsl:call-template>
  127.            </xsl:when>
  128.            <xsl:otherwise>
  129.               <xsl:apply-templates select="$cmdsyn" mode="xref-to">
  130.                 <xsl:with-param name="target" select="$cmdsyn"/>
  131.               </xsl:apply-templates>
  132.            </xsl:otherwise>
  133.          </xsl:choose>
  134.        </a>
  135.        </dt>
  136.  
  137.         <xsl:call-template name="process.funcsynopsis.list">
  138.           <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
  139.           <xsl:with-param name="count" select="$count+1"/>
  140.         </xsl:call-template>
  141.       </xsl:otherwise>
  142.     </xsl:choose>
  143. </xsl:template>
  144.  
  145. <xsl:template match="processing-instruction('dbfunclist')">
  146.   <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
  147.  
  148.   <xsl:if test="count($funcsynopses)<1">
  149.     <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
  150.     </xsl:message>
  151.   </xsl:if>
  152.  
  153.   <dl>
  154.     <xsl:call-template name="process.funcsynopsis.list">
  155.       <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
  156.     </xsl:call-template>
  157.   </dl>
  158. </xsl:template>
  159.  
  160. <!-- ==================================================================== -->
  161.  
  162. </xsl:stylesheet>
  163.