Develop and Download Open Source Software

Browse Subversion Repository

Contents of /topo/body/topo2html.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: 1926 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><body>
6 <xsl:apply-templates select=".//div0" />
7 </body></html>
8 </xsl:template>
9
10 <xsl:template match="div0/head"></xsl:template>
11 <xsl:template match="div1/head"></xsl:template>
12
13 <xsl:template match="p">&#60;p&#62;<xsl:apply-templates/>&#60;/p&#62;</xsl:template>
14 <xsl:template match="quote">&#60;i&#62;<xsl:apply-templates/>&#60;/i&#62;</xsl:template>
15 <xsl:template match="key">&#60;key type="<xsl:value-of select="@type"/>"&#62;<xsl:apply-templates/>&#60;/key&#62;</xsl:template>
16
17 <xsl:template match="ref">&#60;a href="#<xsl:value-of select="@target" />"&#62;<xsl:apply-templates/>&#60;/a&#62;</xsl:template>
18 <xsl:template match="figure"><xsl:if test="string-length(@id) != 0">&#60;/p&#62;&#60;indent val="+1"&#62;&#60;p&#62;&#60;img src="figs/<xsl:value-of select="@id" />.jpg" alt="<xsl:value-of select="head" />"/&#62;&#60;/p&#62;&#60;indent val="-1"&#62;&#60;p&#62;</xsl:if></xsl:template>
19
20 <xsl:template match="p/note">
21 &#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;
22 </xsl:template>
23 <xsl:template match="div1/note">
24 &#60;indent val="+2"&#62;&#60;p&#62;[NOTE: <xsl:apply-templates/>]&#60;/p&#62;&#60;indent val="-2"&#62;
25 </xsl:template>
26 <xsl:template match="div1">
27 <xsl:text>
28 &#60;dt id="</xsl:text><xsl:value-of select="@id" /><xsl:text>"&#62;</xsl:text><xsl:value-of select="head/placeName" /><xsl:text>&#60;/dt&#62;&#60;dd&#62;</xsl:text><xsl:apply-templates /><xsl:text>&#60;/dd&#62;</xsl:text>
29 </xsl:template>
30 <xsl:template match="div0">
31 &#60;H1&#62;<xsl:value-of select="@n" />&#60;/H1&#62;
32 <xsl:apply-templates/>
33 </xsl:template>
34
35 </xsl:stylesheet>

Properties

Name Value
svn:mime-type text/plain

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