b3133cf6f86647335508a48089ca3eeae77e2f47
[m17n/m17n-docs.git] / utils / description-ja.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0"
3                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4                 xmlns:mdb="http://www.m17n.org/mdb"
5                 xmlns:mim="http://www.m17n.org/MIM">
6   <xsl:output method="html" omit-xml-declaration="yes" indent="yes"/>
7   <xsl:strip-space elements="*"/>
8
9 <xsl:template match="/">
10   <xsl:text>/*** \r</xsl:text>
11   <xsl:if test="mdb:database/mdb:doxygen/mdb:page">
12     <xsl:text>@page </xsl:text>
13     <xsl:value-of select="mdb:database/mdb:doxygen/mdb:page/@id"/><xsl:text> </xsl:text>
14     <xsl:value-of select="mdb:database/mdb:doxygen/mdb:page/mdb:brief"/>
15     <xsl:value-of select="mdb:database/mdb:doxygen/mdb:page/text()"/>
16     <xsl:text> </xsl:text>
17     <ul>
18     <xsl:for-each select="mdb:database/mdb:doxygen/mdb:page/mdb:section">
19       <li><xsl:text>@ref </xsl:text><xsl:value-of select="attribute::id"/><xsl:text>-list </xsl:text></li>
20       <xsl:text>\r</xsl:text>
21     </xsl:for-each>
22     </ul>
23
24   <xsl:for-each select="mdb:database/mdb:doxygen/mdb:page/mdb:section">
25     <xsl:variable name="sectionname" select="attribute::id"/>
26 @section <xsl:value-of select="$sectionname"/>-list <xsl:value-of select="mdb:brief"/>
27     <xsl:value-of select="text()"/>
28      <xsl:text>\r</xsl:text>
29     <ul>
30     <xsl:for-each select="//mdb:item">
31       <xsl:if test="attribute::sectionid=$sectionname">
32         <xsl:for-each select="mdb:source/mdb:filename">
33           <xsl:choose>
34             <xsl:when test="ancestor::mdb:item/attribute::sectionid='mim'">
35               <li><xsl:value-of select="."/><xsl:text> (langauge:</xsl:text>
36                   <xsl:value-of select="following-sibling::mim:input-method[1]/mim:tags/mim:language"/>
37                   <xsl:text> name:</xsl:text>
38                   <xsl:value-of select="following-sibling::mim:input-method[1]/mim:tags/mim:name"/>
39                   <xsl:text>)</xsl:text>
40                   <xsl:choose>
41                     <xsl:when  test="following-sibling::mim:input-method[1]/comment()">
42                       <xsl:for-each select="following-sibling::mim:input-method[1]/comment()">
43                         <xsl:value-of select="."/><xsl:text>\r</xsl:text>
44                       </xsl:for-each>
45                     </xsl:when>
46                     <xsl:otherwise>
47                       <xsl:text>\r@verbatim\r</xsl:text>
48                       <xsl:value-of select="following-sibling::mim:input-method[1]/mim:description"/>
49                       <xsl:text>@endverbatim\r</xsl:text>
50                     </xsl:otherwise>
51                   </xsl:choose>
52                   <xsl:text>\r</xsl:text>
53               </li>
54             </xsl:when>
55             <xsl:otherwise>
56               <li><xsl:value-of select="."/><xsl:text>\r</xsl:text>
57                 <xsl:value-of select="parent::mdb:source/parent::mdb:item/mdb:description"/>
58               </li>
59               </xsl:otherwise>
60           </xsl:choose>
61         <xsl:text>\r</xsl:text>
62         </xsl:for-each>
63       </xsl:if>
64     </xsl:for-each>
65     </ul>
66   </xsl:for-each>
67
68 </xsl:if>
69 <xsl:text>*/ </xsl:text>
70
71 </xsl:template>
72
73 </xsl:stylesheet>
74
75