Develop and Download Open Source Software

Browse Subversion Repository

Contents of /shakespeare/onions/onions2html.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27 - (show annotations) (download)
Tue Nov 23 07:14:38 2010 UTC (13 years, 4 months ago) by ohkubo-k
File MIME type: text/plain
File size: 1989 byte(s)
update for 2010/11/23 release
1 <?xml version="1.0" encoding="utf-8" ?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:template match="/">
5 <html>
6 <body>
7 <xsl:apply-templates select=".//div1" />
8 </body>
9 </html>
10 </xsl:template>
11
12 <xsl:template match="div1/head"></xsl:template>
13 <xsl:template match="div2/head/title"></xsl:template>
14 <xsl:template match="entryFree/orth"></xsl:template>
15
16 <xsl:template match="quote">&#60;i&#62;<xsl:apply-templates/>&#60;/i&#62;</xsl:template>
17 <xsl:template match="sense">&#60;p&#62;<b><xsl:value-of select="@n"/></b>&amp;nbsp;<xsl:apply-templates/>&#60;/p&#62;</xsl:template>
18 <xsl:template match="bibl">&#60;bibl n="<xsl:value-of select="@n"/>"&#62;<xsl:apply-templates/>&#60;/bibl&#62;</xsl:template>
19
20 <xsl:template match="hi">
21 <xsl:choose>
22 <xsl:when test="@rend = 'italics'">&#60;i&#62;<xsl:apply-templates/>&#60;/i&#62;</xsl:when>
23 <xsl:when test="@rend = 'super'">&#60;sup&#62;<xsl:apply-templates/>&#60;/sup&#62;</xsl:when>
24 <xsl:when test="@rend = 'sub'">&#60;sub&#62;<xsl:apply-templates/>&#60;/sub&#62;</xsl:when>
25 <xsl:when test="@rend = 'bold'">&#60;dfn&#62;<xsl:apply-templates/>&#60;/dfn&#62;</xsl:when>
26 <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
27 </xsl:choose>
28 </xsl:template>
29
30 <xsl:template match="entryFree">
31 &#60;dt id="<xsl:value-of select="@key" />"&#62;<xsl:value-of select="orth" /><xsl:text>&#60;/dt&#62;&#60;dd&#62;</xsl:text>
32 <xsl:apply-templates />
33 <xsl:text>&#60;/dd&#62;</xsl:text>
34 </xsl:template>
35
36 <xsl:template match="div2">
37 &#60;H1&#62;<xsl:value-of select="head/title" />&#60;/H1&#62;
38 <xsl:apply-templates/>
39 </xsl:template>
40 <xsl:template match="div1">
41 &#60;H1&#62;<xsl:value-of select="head/hi/hi" />&#60;/H1&#62;
42 <xsl:apply-templates/>
43 </xsl:template>
44
45 </xsl:stylesheet>

Properties

Name Value
svn:mime-type text/plain

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26