view summa/bilingual/bi.xsl @ 45:a768840ee9ff

correct dtd
author ht
date Sun, 20 Dec 2009 14:49:34 +0000
parents a2740f999f93
children 52063d0f8985
line wrap: on
line source

<?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:template>
 
 <xsl:template match="div2|div3|div4">
  <div>
   <xsl:apply-templates select="node()|@*"/>
  </div>
 </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>
 
 <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:copy>
   <xsl:apply-templates select="node()|@*"/>
  </xsl:copy>
 </xsl:template>
</xsl:stylesheet>