changeset 69:52063d0f8985

modified to work in merge.xpl
author ht
date Sun, 03 Jan 2010 18:46:39 +0000
parents 6e7992263303
children 176b0e713f8f
files summa/bilingual/bi.xsl
diffstat 1 files changed, 25 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/summa/bilingual/bi.xsl	Sun Jan 03 18:46:18 2010 +0000
+++ b/summa/bilingual/bi.xsl	Sun Jan 03 18:46:39 2010 +0000
@@ -1,42 +1,36 @@
 <?xml version='1.0'?>
 <!DOCTYPE xsl:stylesheet SYSTEM "../../../../lib/xml/xsl.dtd" >
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml">
- <xsl:template match="/">
-  <html>
-   <head>
-    <title>
-     <xsl:text>Bilingual Aquinas</xsl:text>
-     <xsl:value-of select="div2/div3/h3"/>
-    </title>
-    <style>
-     h2, h3, h4 {margin-bottom: 0px; clear: both}
-    @page { size: A4 portrait; margin: 1cm} 
-    </style>
-   </head>
-   <body style="font-family: Bitstream Vera Serif">
-    <xsl:apply-templates/>
-   </body>
-  </html>
+<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">
+ 
+ <xsl:template match="x:a[@href and not(text())]"/>
+ 
+ <xsl:template match="x:h3">
+  <xsl:copy>
+   <xsl:apply-templates select="@*"/>
+   <xsl:text>Q. </xsl:text><xsl:value-of select="substring-after(../@id,'FP_Q')"/><xsl:text>. </xsl:text>
+   <xsl:apply-templates/>
+  </xsl:copy>
  </xsl:template>
  
- <xsl:template match="div2|div3|div4">
-  <div>
-   <xsl:apply-templates select="node()|@*"/>
-  </div>
+ <xsl:template match="x:h4">
+  <xsl:copy>
+   <xsl:apply-templates select="@*"/>
+   <xsl:text>Q. </xsl:text><xsl:value-of select="substring-after(../../@id,'FP_Q')"/><xsl:text>. A. </xsl:text>
+   <xsl:value-of select="substring-after(../@id,'_A')"/>
+   <xsl:text>. </xsl:text>
+   <xsl:apply-templates/>
+  </xsl:copy>
  </xsl:template>
  
- <xsl:template match="div[@class='bilingual']"><div style="clear: both; margin-top: .5em">
-  <div style="width: 45%; float: left"><xsl:apply-templates select="*[1]"/></div>
-  <div style="width: 45%; float: right"><xsl:apply-templates select="*[2]"/></div></div>
+ <xsl:template match="x:div[@class='bilingual']">
+  <xsl:copy>
+   <xsl:apply-templates select="@*"/>
+   <div class="eng"><xsl:apply-templates select="*[1]"/></div>
+   <div class="lat"><xsl:apply-templates select="*[2]"/></div>
+  </xsl:copy>
  </xsl:template>
  
- <xsl:template match="*">
-  <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
-   <xsl:apply-templates select="node()|@*"/>
-  </xsl:element>
- </xsl:template>
- 
- <xsl:template match="text()|comment()|processing-instruction()|@*">
+ <xsl:template match="node()|@*">
   <xsl:copy>
    <xsl:apply-templates select="node()|@*"/>
   </xsl:copy>