changeset 55:093a560860d9

work together
author ht
date Tue, 29 Dec 2009 21:13:07 +0000
parents 77921d86a058
children b098f72b8f2f
files summa/english/split.xsl summa/english/thml.html.xsl
diffstat 2 files changed, 20 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/summa/english/split.xsl	Tue Dec 29 18:40:48 2009 +0000
+++ b/summa/english/split.xsl	Tue Dec 29 21:13:07 2009 +0000
@@ -4,32 +4,15 @@
  
  <xsl:output method="xhtml" indent="no"/>
  
- <xsl:template match="x:body">
-  <xsl:variable name="pre" select="x:a[@href='summa.FP_Q1.html'][1]"/>
-  <xsl:copy>
-   <xsl:apply-templates select="@*"/>
-   <xsl:for-each select="$pre">
-   <xsl:apply-templates select="preceding-sibling::*"/>
-   <xsl:apply-templates select="."/>
-   <xsl:for-each-group select="following-sibling::*" group-starting-with="x:h1[@id='viii-p0.1']">
-    <xsl:choose>
-     <xsl:when test="position()=1">
-      <xsl:for-each-group select="current-group()" group-starting-with="x:h2">       <xsl:variable name="name" select="translate(substring-before(./@id,'-'),'.','_')"/>
-    <xsl:message>f: <xsl:value-of select="$name"/>|<xsl:value-of select="local-name()"/>|<xsl:value-of select="count(current-group())"/></xsl:message>
-<xsl:text>&#10;</xsl:text>
-    <xi:include href="{$name}.html"/>
+ <xsl:template match="x:div[@class='div2']">
+  <xsl:variable name="name" select="translate(@id,'.','_')"/>
+  <xsl:message>f: <xsl:value-of select="$name"/>|<xsl:value-of select="count(x:div)"/></xsl:message>
+  <xi:include href="{$name}.html"/>
     <xsl:result-document method="xhtml" href="{$name}.html">
-     <div><xsl:apply-templates select="current-group()" mode="subdoc"/></div>
+     <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>`
+     </xsl:copy>
     </xsl:result-document>
-      </xsl:for-each-group>
-<xsl:text>&#10;</xsl:text>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:apply-templates select="current-group()"/>
-     </xsl:otherwise>
-    </xsl:choose>    
-   </xsl:for-each-group>
-  </xsl:for-each></xsl:copy>
  </xsl:template>
  
  <xsl:template match="node()|@*">
@@ -37,10 +20,4 @@
    <xsl:apply-templates select="node()|@*"/>
   </xsl:copy>
  </xsl:template>
- 
- <xsl:template match="node()|@*" mode="subdoc">
-  <xsl:copy>
-   <xsl:apply-templates select="node()|@*"/>
-  </xsl:copy>
- </xsl:template>
 </xsl:stylesheet>
--- a/summa/english/thml.html.xsl	Tue Dec 29 18:40:48 2009 +0000
+++ b/summa/english/thml.html.xsl	Tue Dec 29 21:13:07 2009 +0000
@@ -1,6 +1,6 @@
 <?xml version='1.0'?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:lang="http://www.ccel.org/info/languageCodes.xml" xmlns:letter="http://www.ccel.org/alphabetLetters" xmlns:str="http://exslt.org/strings">
-<xsl:output method="html" indent="yes" encoding="UTF-8"/>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:lang="http://www.ccel.org/info/languageCodes.xml" xmlns:letter="http://www.ccel.org/alphabetLetters" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="xi lang letter str">
+<xsl:output method="xhtml" indent="yes" encoding="UTF-8"/>
 
 <!--
 thml.html.xsl: convert a ThML document to HTML
@@ -375,7 +375,7 @@
   </head>
 
   <body>
-  <xsl:attribute name="onLoad">init.call(); highlightSearch();</xsl:attribute>
+  <xsl:attribute name="onload">init.call(); highlightSearch();</xsl:attribute>
   <xsl:if test="$isDaily=1 and $sect='today'">
 		<script>
 			goToday();
@@ -472,6 +472,7 @@
 <!-- ================================================================ -->
 <xsl:template match="div1|div2|div3|div4|div5|div[@type='sect']" mode="includeParsing">
   <xsl:if test="($sect='all' or @id=$theDivID or @id=$osisSect)">
+   <div id="{@id}" class="{local-name()}">
     <xsl:call-template name="navbar">
       <xsl:with-param name="progress" select="@progress"/>
     </xsl:call-template>
@@ -487,6 +488,7 @@
     <xsl:call-template name="navbar">
       <xsl:with-param name="progress" select="@progress"/>
     </xsl:call-template>
+   </div>
   </xsl:if>
 </xsl:template>
 
@@ -506,12 +508,12 @@
     <table align="center"><tr><td>
       <h1 class="title" id="toc">Table of Contents</h1>
 	  <xsl:if test="$isDaily=1">
-	    <p class="TOC1" style="text-align:center">
+	    <div class="TOC1" style="text-align:center">
 		<form onsubmit="return goToday()">
 		<input type="submit" value="Go to today"/>
 		</form>
-		</p>
-		<p class="TOC1" style="text-align:center">
+		</div>
+		<div class="TOC1" style="text-align:center">
 		  <form onsubmit="return goDay(month,day)">
 		   <select name="month">
 		     <option value="01">January</option>
@@ -562,7 +564,7 @@
 		   </select>
 		   <input type="submit" value="Go to day..."/>
 		</form>
-		</p>
+		</div>
 	  </xsl:if>
       <p class="TOC1" style="text-align:center">
         <a class="TOC" href="{$aboutURL}">
@@ -838,7 +840,7 @@
   
   <p><a name="about">&#160;</a></p>
   <center>
-  <table border="2" bordercolor="#660000" style="margin-top:12pt; width: 440pt">
+  <table border="2" style="margin-top:12pt; width: 440pt; border-color: #660000">
     <tr>
       <td bgcolor="#660000" width="100%" colspan="3"><p class="whitehead" style="text-align:center; font-size:14pt">About  
         <i><xsl:value-of select="$title"/></i> by <xsl:value-of select="$author"/></p>
@@ -846,7 +848,7 @@
     </tr>
     <tr><td colspan="3">
       <center>
-      <p style="text-align:center; margin-top:12pt">
+      <div style="text-align:center; margin-top:12pt">
       <form method="get" action="http://www.ccel.org/search">
 	<span style="font-weight:bold; font-size:14pt"><a class="TOC" href="{$titlepageURL}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>Title Page</a></span>
 	&#160; &#160; &#160;
@@ -862,9 +864,9 @@
 	<input type="hidden" name="bookID" value="{$bookID}"/>
 	<span style="font-weight:bold; font-size:16pt">Search:</span>&#160;
 	<input type="text" size="12" name="q" value=""/>
- 	<input type="Submit" value="Go"/>
+ 	<input type="submit" value="Go"/>
       </form>
-      </p>
+      </div>
       </center>
     </td></tr>
     <tr><td><table>