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

  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3.                 version='1.0'>
  4.  
  5. <xsl:template match="refsect2">
  6.   <xsl:text> .Sh "</xsl:text>
  7.   <xsl:value-of select="substring-before(title[1],' ')"/>
  8.   <xsl:text>" </xsl:text>
  9.   <xsl:apply-templates/>
  10. </xsl:template>
  11. <xsl:template match="refsect2/title"></xsl:template>
  12. <xsl:template match="refsect2/programlisting"></xsl:template>
  13.  
  14. <xsl:template match="funcsynopsis">
  15.   <xsl:text> .BI "</xsl:text>
  16.   <xsl:apply-templates/>
  17. </xsl:template>
  18.  
  19. <xsl:template match="funcsynopsis/funcprototype">
  20.   <xsl:apply-templates/>
  21.   <xsl:text> ); .br </xsl:text>
  22. </xsl:template>
  23.  
  24. <xsl:template match="funcsynopsis/funcprototype/funcdef">
  25.   <xsl:apply-templates/>
  26.   <xsl:value-of select="function"/>
  27.   <xsl:text> (</xsl:text>
  28. </xsl:template>
  29. <xsl:template match="funcsynopsis/funcprototype/funcdef/function"></xsl:template>
  30.  
  31. <xsl:template match="funcsynopsis/funcprototype/paramdef">
  32.   <xsl:apply-templates/>
  33.   <xsl:text>" </xsl:text>
  34.   <xsl:value-of select="parameter"/>
  35.   <xsl:choose>
  36.   <xsl:when test="following-sibling::paramdef">
  37.     <xsl:text> ", </xsl:text>
  38.   </xsl:when>
  39.   </xsl:choose>
  40. </xsl:template>
  41. <xsl:template match="funcsynopsis/funcprototype/paramdef/parameter"></xsl:template>
  42.  
  43. <xsl:template match="refsect2/informaltable/tgroup/tbody/row">
  44.   <xsl:text>.Ip "\(bu \s-1</xsl:text>
  45.   <xsl:value-of select="entry[1]/parameter[1]"/>
  46.   <xsl:text>\s0 \- </xsl:text>
  47.   <xsl:value-of select="normalize-space(entry[2])"/>
  48.   <xsl:text>" </xsl:text>
  49. </xsl:template>
  50.  
  51. <xsl:template match="refsect1">
  52.   <xsl:text> .SH "</xsl:text>
  53.   <xsl:value-of select="translate(title[1],'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
  54.   <xsl:text>" </xsl:text>
  55.   <xsl:apply-templates/>
  56. </xsl:template>
  57.  
  58. <xsl:template match="refsynopsisdiv">
  59.   <xsl:text> .SH "</xsl:text>
  60.   <xsl:value-of select="translate(title[1],'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
  61.   <xsl:text>" </xsl:text>
  62.   <xsl:apply-templates/>
  63. </xsl:template>
  64. <xsl:template match="refsynopsisdiv/title"></xsl:template>
  65.  
  66. <xsl:template match="refsect1/title"></xsl:template>
  67.  
  68. <xsl:template match="para">
  69.      <xsl:text>.PP </xsl:text>
  70.      <xsl:apply-templates/>
  71. </xsl:template>
  72.  
  73. <xsl:template match="*"><xsl:apply-templates/></xsl:template>
  74.  
  75. <xsl:template match="refentry">
  76.   <xsl:text>." DO NOT MODIFY THIS FILE!
  77. .de Sh \" Subsection
  78. .br
  79. .if t .Sp
  80. .ne 5
  81. .PP
  82. \fB\\$1\fR
  83. .PP
  84. ..
  85. .de Sp \" Vertical space (when we can't use .PP)
  86. .if t .sp .5v
  87. .if n .sp
  88. ..
  89. .de Ip \" List item
  90. .br
  91. .ie \\n(.$>=3 .ne \\$3
  92. .el .ne 3
  93. .IP "\\$1" \\$2
  94. ..
  95. .TH "</xsl:text>
  96.   <xsl:value-of select="refmeta/refentrytitle[1]"/>
  97.   <xsl:text>" </xsl:text>
  98.   <xsl:value-of select="refmeta/manvolnum[1]"/>
  99.   <xsl:text> "</xsl:text>
  100.   <xsl:value-of select="@revision"/>
  101.   <xsl:text>" </xsl:text>
  102.   <xsl:apply-templates/>
  103. </xsl:template>
  104.  
  105. <xsl:template match="refmeta"></xsl:template>
  106.  
  107. <xsl:template match="refnamediv">
  108.   <xsl:text>.SH NAME </xsl:text>
  109.   <xsl:value-of select="refname"/>
  110.   <xsl:text> \- </xsl:text>
  111.   <xsl:value-of select="refpurpose"/>
  112. </xsl:template>
  113.  
  114. <xsl:template match="refentry/refentrytitle"></xsl:template>
  115. <xsl:template match="article/articleinfo/*"></xsl:template>
  116.  
  117. <xsl:template match="term/option">
  118.   <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
  119. </xsl:template>
  120.  
  121. <xsl:template match="varlistentry">
  122.   <xsl:text> .TP </xsl:text>
  123. <xsl:apply-templates select="./term"/>
  124. <xsl:apply-templates select="./listitem"/>
  125. </xsl:template>
  126.  
  127. <xsl:template match="varlistentry/listitem/para">
  128.   <xsl:apply-templates/>
  129. </xsl:template>
  130.  
  131. <xsl:template match="filename">
  132.   <xsl:text> .FN </xsl:text><xsl:apply-templates/>
  133. </xsl:template>
  134.  
  135. <xsl:template match="userinput">
  136.   <xsl:text> .IP .B </xsl:text><xsl:apply-templates/>
  137. </xsl:template>
  138.  
  139. <xsl:template match="envar">
  140.   <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
  141. </xsl:template>
  142.  
  143. <xsl:template match="filename">
  144.   <xsl:text>\fI</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
  145. </xsl:template>
  146.  
  147. </xsl:stylesheet>
  148.