Develop and Download Open Source Software

Browse Subversion Repository

Contents of /shakespeare/txt/shakes2html.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: 2388 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 <H1><xsl:value-of select="TEI.2/teiHeader/fileDesc/titleStmt/title"/>.</H1>
8 <xsl:apply-templates select=".//div1" />
9 </body>
10 </html>
11 </xsl:template>
12
13 <xsl:template match="div1/head">&#60;H2&#62;<xsl:apply-templates/>&#60;/H2&#62;</xsl:template>
14 <xsl:template match="div2/head">&#60;H3&#62;<xsl:apply-templates/>&#60;/H3&#62;</xsl:template>
15
16 <xsl:template match="roleDesc">, <xsl:apply-templates/></xsl:template>
17 <xsl:template match="castItem">&#60;p&#62;<xsl:apply-templates/>&#60;/p&#62;</xsl:template>
18 <xsl:template match="castGroup/head">&#60;br&#62;&#60;p&#62;&#60;b&#62;<xsl:apply-templates/>&#60;/b&#62;&#60;/p&#62;</xsl:template>
19 <xsl:template match="castGroup"><xsl:apply-templates/>&#60;br&#62;</xsl:template>
20
21 <xsl:template match="sp/p">&#60;p&#62;####<xsl:apply-templates/>&#60;/p&#62;</xsl:template>
22 <xsl:template match="sp/p/lb"><xsl:choose><xsl:when test="@ed = 'G' or string-length(@ed) = 0">&#60;/p&#62;
23 <xsl:if test="string-length(@n) != 0">$$$$<xsl:value-of select="@n"/>$$$$</xsl:if>
24 &#60;p&#62;####</xsl:when><xsl:otherwise><xsl:text></xsl:text></xsl:otherwise></xsl:choose></xsl:template>
25 <xsl:template match="l/lb"><xsl:choose><xsl:when test="@ed = 'G'">&#60;/p&#62;
26 <xsl:if test="string-length(@n) != 0">$$$$<xsl:value-of select="@n"/>$$$$</xsl:if>
27 &#60;p&#62;####</xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose></xsl:template>
28
29 <xsl:template match="l"><xsl:if test="string-length(@n) != 0">
30 $$$$<xsl:value-of select="@n"/>$$$$
31 </xsl:if>&#60;p&#62;####<xsl:apply-templates/>&#60;/p&#62;</xsl:template>
32 <xsl:template match="lg"><xsl:apply-templates/>&#60;br&#62;</xsl:template>
33 <xsl:template match="speaker">
34 &#60;p&#62;&#60;b&#62;<xsl:apply-templates/>&#60;/b&#62;&#60;/p&#62;
35 </xsl:template>
36 <xsl:template match="stage">
37 &#60;indent val="3"&#62;&#60;p&#62;&#60;i&#62;<xsl:apply-templates/>&#60;/i&#62;&#60;/p&#62;&#60;indent val="1"&#62;</xsl:template>
38
39 <!-- for lc.xml, pht.xml -->
40 <xsl:template match="div1/lg"><xsl:apply-templates/>&#60;br&#62;&#60;br&#62;</xsl:template>
41
42 <!-- for ven.xml -->
43 <xsl:template match="div1/lg1"><xsl:apply-templates/>&#60;br&#62;</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