Develop and Download Open Source Software

Browse Subversion Repository

Contents of /shakespeare/abbott/abbott2html.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: 3543 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>Abbott. <xsl:apply-templates select="TEI.2/teiHeader/fileDesc/sourceDesc/biblStruct/monogr/title"/> [abb]</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 <xsl:template match="div3/head"></xsl:template>
16 <xsl:template match="div3"><xsl:choose><xsl:when test="string-length(ancestor::div2/head) != 0">&#60;H4 id="<xsl:value-of select="@id"/>"&#62;<xsl:value-of select="substring(@id,4)"/>. <xsl:value-of select="head"/>&#60;/H4&#62;</xsl:when><xsl:when test="string-length(ancestor::div2/head) = 0">&#60;H3 id="<xsl:value-of select="@id"/>"&#62;<xsl:value-of select="substring(@id,4)"/>. <xsl:value-of select="head"/>&#60;/H3&#62;</xsl:when></xsl:choose>&#60;key type="������" title="abb.<xsl:value-of select="substring(@id,4)"/>"&#62;abb.<xsl:value-of select="substring(@id,4)"/>&#60;/key&#62;<xsl:apply-templates/></xsl:template>
17
18 <xsl:template match="p">&#60;p&#62;<xsl:apply-templates/>&#60;/p&#62;</xsl:template>
19 <xsl:template match="emph"><em><xsl:apply-templates/></em></xsl:template>
20 <xsl:template match="hi">
21 <xsl:choose>
22 <!-- rend = italics, smallcaps, super, sub, underline -->
23 <xsl:when test="@rend = 'italics'">&#60;i&#62;<xsl:apply-templates/>&#60;/i&#62;</xsl:when>
24 <xsl:when test="@rend = 'italic'">&#60;i&#62;<xsl:apply-templates/>&#60;/i&#62;</xsl:when>
25 <xsl:when test="@rend = 'bold'">&#60;b&#62;<xsl:apply-templates/>&#60;/b&#62;</xsl:when>
26 <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
27 </xsl:choose>
28 </xsl:template>
29 <xsl:template match="lb">&#60;br&#62;</xsl:template>
30
31 <xsl:template match="quote">&#60;i&#62;<xsl:apply-templates/>&#60;/i&#62;</xsl:template>
32 <xsl:template match="l">&#60;indent val="+1"&#62;&#60;p&#62;<xsl:apply-templates/>&#60;/p&#62;&#60;indent val="-1"&#62;</xsl:template>
33 <xsl:template match="bibl">&#60;bibl n="<xsl:value-of select="@n"/>"&#62;<xsl:apply-templates/>&#60;/bibl&#62;</xsl:template>
34 <xsl:template match="key">&#60;key type="<xsl:value-of select="@type"/>"&#62;<xsl:apply-templates/>&#60;/key&#62;</xsl:template>
35
36 <xsl:template match="table">&#60;indent val="+1"&#62;&#60;table&#62;<xsl:apply-templates/>&#60;/table&#62;&#60;indent val="-1"&#62;</xsl:template>
37 <xsl:template match="row">&#60;tr&#62;<xsl:apply-templates/>&#60;/tr&#62;</xsl:template>
38 <xsl:template match="cell">&#60;td&#62;<xsl:apply-templates/>&#60;/td&#62;</xsl:template>
39 <xsl:template match="list">
40 &#60;indent val="+1"&#62;<xsl:apply-templates/>&#60;indent val="-1"&#62;
41 </xsl:template>
42 <xsl:template match="item">
43 &#60;p&#62;<xsl:apply-templates/>&#60;/p&#62;
44 </xsl:template>
45 <xsl:template match="p/note">
46 &#60;/p&#62;&#60;indent val="+2"&#62;&#60;p&#62;[NOTE: <xsl:apply-templates/>]&#60;/p&#62;&#60;indent val="-2"&#62;&#60;p&#62;
47 </xsl:template>
48 <xsl:template match="div1/note">
49 &#60;indent val="+2"&#62;&#60;p&#62;[NOTE: <xsl:apply-templates/>]&#60;/p&#62;&#60;indent val="-2"&#62;
50 </xsl:template>
51
52 <xsl:template match="ref">&#60;a href="#<xsl:value-of select="@target"/>"&#62;<xsl:apply-templates/>&#60;/a&#62;</xsl:template>
53
54 </xsl:stylesheet>

Properties

Name Value
svn:mime-type text/plain

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