home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _B771453207B8432CB6043E6E82E2C55C < prev    next >
Encoding:
Text File  |  2002-09-20  |  4.2 KB  |  141 lines

  1. <!--  refdisplay.xsl 1.1; 2002 May 8
  2.  | Specific override stylesheet for reference topics (demo)
  3.  |
  4.  | Copyright IBM Corporation, 2002
  5.  | This file is part of the DITA package on IBM's developerWorks site.
  6.  | See license.txt for disclaimers.
  7.  *-->
  8.  
  9. <xsl:stylesheet version="1.0"
  10.      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  11.  
  12. <xsl:import href="topic2html.xsl"/>
  13.  
  14. <!-- XHTML output with XML syntax) -->
  15. <xsl:output method="xml"
  16.             encoding="iso-8859-1"
  17.             indent="yes"
  18.             doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  19.             doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  20. />
  21.  
  22.  
  23. <xsl:template match="/">
  24.   <xsl:comment>Sample DITA reference to HTML application by IBM Corp., 2002</xsl:comment>
  25.   <xsl:apply-templates/>
  26. </xsl:template>
  27.  
  28.  
  29. <!-- elements reference and refbody will fall through to topic processors -->
  30.  
  31.  
  32.   <!-- when a specialized rule is imbedded with the topic defaults, there will be
  33.        a priority conflict unless you set the priority of the contained specialied rule
  34.        so that it overrides the topic fallback -->
  35.  
  36. <xsl:template match="*[contains(@class,' reference/refbody ')]/*[contains(@class,' topic/section ')]" priority="1">
  37.   <xsl:call-template name="sect-heading"><xsl:with-param name="deftitle"></xsl:with-param></xsl:call-template>
  38.   <blockquote>
  39.     <xsl:apply-templates/>
  40.   </blockquote>
  41. </xsl:template>
  42.  
  43.  
  44. <xsl:template match="*[contains(@class,' reference/refbody ')]/*[contains(@class,' topic/example ')]" priority="1">
  45.   <xsl:call-template name="sect-heading">
  46.   <xsl:with-param name="deftitle">
  47.       <xsl:call-template name="getString">
  48.         <xsl:with-param name="stringName" select="'Examples'"/>
  49.       </xsl:call-template>
  50.   </xsl:with-param></xsl:call-template>
  51.   <blockquote>
  52.     <xsl:apply-templates/>
  53.   </blockquote>
  54. </xsl:template>
  55.  
  56.  
  57. <xsl:template match="*[contains(@class,' reference/refsyn ')]" priority="1">
  58.   <xsl:call-template name="sect-heading"><xsl:with-param name="deftitle">
  59.       <xsl:call-template name="getString">
  60.         <xsl:with-param name="stringName" select="'Syntax'"/>
  61.       </xsl:call-template>
  62.       </xsl:with-param></xsl:call-template>
  63.   <blockquote>
  64.     <xsl:apply-templates/>
  65.   </blockquote>
  66. </xsl:template>
  67.  
  68.  
  69. <xsl:template match="*[contains(@class,' reference/properties ')]" priority="3">
  70.   <xsl:call-template name="sect-heading"><xsl:with-param name="deftitle"></xsl:with-param></xsl:call-template>
  71.   <table border="1">
  72.     <xsl:call-template name="setclass"/>
  73.     <xsl:apply-templates select="@id"/>
  74.     <xsl:apply-templates/>
  75.   </table>
  76. </xsl:template>
  77.  
  78.  
  79. <xsl:template match="*[contains(@class,' reference/property ')]" priority="1">
  80.   <tr>
  81.     <xsl:call-template name="setclass"/>
  82.     <xsl:apply-templates/>
  83.   </tr>
  84. </xsl:template>
  85.  
  86.  
  87. <xsl:template match="*[contains(@class,' reference/proptype ')]" priority="1">
  88.   <td align="left" valign="top">
  89.     <xsl:call-template name="setclass"/>
  90.     <code>
  91.       <xsl:apply-templates/>
  92.     </code>
  93.   </td>
  94. </xsl:template>
  95.  
  96.  
  97. <xsl:template match="*[contains(@class,' reference/propvalue ')]" priority="1">
  98.   <td align="left" valign="top">
  99.     <xsl:call-template name="setclass"/>
  100.     <xsl:apply-templates/>
  101.   </td>
  102. </xsl:template>
  103.  
  104.  
  105. <xsl:template match="*[contains(@class,' reference/propdesc ')]" priority="1">
  106.   <td align="left" valign="top">
  107.     <xsl:call-template name="setclass"/>
  108.     <xsl:apply-templates/>
  109.   </td>
  110. </xsl:template>
  111.  
  112.  
  113. <!-- parameter lists (specialized DL within a refsect or refbody)  -->
  114. <xsl:template match="*[contains(@class,' reference/parml ')]" priority="1">
  115.   <dl>
  116.     <xsl:apply-templates/>
  117.   </dl>
  118. </xsl:template>
  119.  
  120.  
  121. <xsl:template match="*[contains(@class,' reference/plentry ')]" priority="1">
  122.   <xsl:apply-templates/>
  123. </xsl:template>
  124.  
  125. <xsl:template match="*[contains(@class,' reference/pt ')]" priority="1">
  126.   <dt>
  127.     <!-- create a potentially linkable target for associative link possibilities -->
  128.     <a name="pl_{.}"><xsl:apply-templates/></a>
  129.   </dt>
  130. </xsl:template>
  131.  
  132. <xsl:template match="*[contains(@class,' reference/pd ')]" priority="1">
  133.   <dd>
  134.     <xsl:apply-templates/>
  135.   </dd>
  136. </xsl:template>
  137.  
  138.  
  139. </xsl:stylesheet>
  140.  
  141.