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

  1. <?xml version='1.0'?>
  2. <!-- vim:set sts=2 shiftwidth=2 syntax=sgml: -->
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.                 version='1.0'>
  5.  
  6. <xsl:template match="para|simpara|remark" mode="list">
  7.   <xsl:variable name="foo">
  8.     <xsl:apply-templates/>
  9.   </xsl:variable>
  10.   <xsl:value-of select="normalize-space($foo)"/>
  11.   <xsl:text> </xsl:text>
  12.   <xsl:if test="following-sibling::para or following-sibling::simpara or
  13.         following-sibling::remark">
  14.     <!-- Make sure multiple paragraphs within a list item don't -->
  15.     <!-- merge together.                                        -->
  16.     <xsl:text> </xsl:text>
  17.   </xsl:if>
  18. </xsl:template>
  19.  
  20. <xsl:template match="varlistentry|glossentry">
  21.   <xsl:text> .TP </xsl:text>
  22.   <xsl:apply-templates/>
  23. </xsl:template>
  24.  
  25. <xsl:template match="variablelist|glosslist" mode="list">
  26.   <xsl:text> .RS </xsl:text>
  27.   <xsl:apply-templates/>
  28.   <xsl:text> .RE </xsl:text>
  29. </xsl:template>
  30.  
  31. <xsl:template match="varlistentry/term|glossterm">
  32.   <xsl:variable name="content">
  33.     <xsl:apply-templates/>
  34.   </xsl:variable>
  35.   <xsl:value-of select="normalize-space($content)"/>
  36.   <xsl:text>, </xsl:text>
  37. </xsl:template>
  38.  
  39. <xsl:template
  40.      match="varlistentry/term[position()=last()]|glossterm[position()=last()]"
  41.      priority="2">
  42.   <xsl:variable name="content">
  43.     <xsl:apply-templates/>
  44.   </xsl:variable>
  45.   <xsl:value-of select="normalize-space($content)"/>
  46. </xsl:template>
  47.  
  48. <xsl:template match="varlistentry/listitem|glossdef">
  49.   <xsl:text> </xsl:text>
  50.   <xsl:apply-templates mode="list"/>
  51. </xsl:template>
  52.  
  53. <xsl:template match="itemizedlist/listitem">
  54.   <xsl:text>\(bu </xsl:text>
  55.   <xsl:apply-templates mode="list"/>
  56.   <xsl:if test="position()!=last()">
  57.     <xsl:text>.TP </xsl:text>
  58.   </xsl:if>
  59. </xsl:template>
  60.  
  61. <xsl:template match="orderedlist/listitem|procedure/step">
  62.   <xsl:number format="1."/>
  63.   <xsl:text> </xsl:text>
  64.   <xsl:apply-templates mode="list"/>
  65.   <xsl:if test="position()!=last()">
  66.     <xsl:text>.TP </xsl:text>
  67.   </xsl:if>
  68. </xsl:template>
  69.  
  70. <xsl:template match="itemizedlist|orderedlist|procedure">
  71.   <xsl:text> .TP 3 </xsl:text>
  72.   <xsl:apply-templates/>
  73.   <xsl:text>.LP </xsl:text>
  74. </xsl:template>
  75.  
  76. </xsl:stylesheet>
  77.