comparison summa/bilingual/bi.xsl @ 69:52063d0f8985

modified to work in merge.xpl
author ht
date Sun, 03 Jan 2010 18:46:39 +0000
parents a768840ee9ff
children 3dd981256764
comparison
equal deleted inserted replaced
68:6e7992263303 69:52063d0f8985
1 <?xml version='1.0'?> 1 <?xml version='1.0'?>
2 <!DOCTYPE xsl:stylesheet SYSTEM "../../../../lib/xml/xsl.dtd" > 2 <!DOCTYPE xsl:stylesheet SYSTEM "../../../../lib/xml/xsl.dtd" >
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml"> 3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:x="http://www.w3.org/1999/xhtml">
4 <xsl:template match="/"> 4
5 <html> 5 <xsl:template match="x:a[@href and not(text())]"/>
6 <head> 6
7 <title> 7 <xsl:template match="x:h3">
8 <xsl:text>Bilingual Aquinas</xsl:text> 8 <xsl:copy>
9 <xsl:value-of select="div2/div3/h3"/> 9 <xsl:apply-templates select="@*"/>
10 </title> 10 <xsl:text>Q. </xsl:text><xsl:value-of select="substring-after(../@id,'FP_Q')"/><xsl:text>. </xsl:text>
11 <style> 11 <xsl:apply-templates/>
12 h2, h3, h4 {margin-bottom: 0px; clear: both} 12 </xsl:copy>
13 @page { size: A4 portrait; margin: 1cm}
14 </style>
15 </head>
16 <body style="font-family: Bitstream Vera Serif">
17 <xsl:apply-templates/>
18 </body>
19 </html>
20 </xsl:template> 13 </xsl:template>
21 14
22 <xsl:template match="div2|div3|div4"> 15 <xsl:template match="x:h4">
23 <div> 16 <xsl:copy>
24 <xsl:apply-templates select="node()|@*"/> 17 <xsl:apply-templates select="@*"/>
25 </div> 18 <xsl:text>Q. </xsl:text><xsl:value-of select="substring-after(../../@id,'FP_Q')"/><xsl:text>. A. </xsl:text>
19 <xsl:value-of select="substring-after(../@id,'_A')"/>
20 <xsl:text>. </xsl:text>
21 <xsl:apply-templates/>
22 </xsl:copy>
26 </xsl:template> 23 </xsl:template>
27 24
28 <xsl:template match="div[@class='bilingual']"><div style="clear: both; margin-top: .5em"> 25 <xsl:template match="x:div[@class='bilingual']">
29 <div style="width: 45%; float: left"><xsl:apply-templates select="*[1]"/></div> 26 <xsl:copy>
30 <div style="width: 45%; float: right"><xsl:apply-templates select="*[2]"/></div></div> 27 <xsl:apply-templates select="@*"/>
28 <div class="eng"><xsl:apply-templates select="*[1]"/></div>
29 <div class="lat"><xsl:apply-templates select="*[2]"/></div>
30 </xsl:copy>
31 </xsl:template> 31 </xsl:template>
32 32
33 <xsl:template match="*"> 33 <xsl:template match="node()|@*">
34 <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
35 <xsl:apply-templates select="node()|@*"/>
36 </xsl:element>
37 </xsl:template>
38
39 <xsl:template match="text()|comment()|processing-instruction()|@*">
40 <xsl:copy> 34 <xsl:copy>
41 <xsl:apply-templates select="node()|@*"/> 35 <xsl:apply-templates select="node()|@*"/>
42 </xsl:copy> 36 </xsl:copy>
43 </xsl:template> 37 </xsl:template>
44 </xsl:stylesheet> 38 </xsl:stylesheet>