[sword-svn] r127 - in trunk/thml2osis/xslt: . tests

lukeplant at www.crosswire.org lukeplant at www.crosswire.org
Fri Nov 30 08:49:52 MST 2007


Author: lukeplant
Date: 2007-11-30 08:49:52 -0700 (Fri, 30 Nov 2007)
New Revision: 127

Modified:
   trunk/thml2osis/xslt/tests/runtests.sh
   trunk/thml2osis/xslt/thml2osis.xslt
Log:
Reworkeed last patch to more careful.


Modified: trunk/thml2osis/xslt/tests/runtests.sh
===================================================================
--- trunk/thml2osis/xslt/tests/runtests.sh	2007-11-30 15:47:34 UTC (rev 126)
+++ trunk/thml2osis/xslt/tests/runtests.sh	2007-11-30 15:49:52 UTC (rev 127)
@@ -11,7 +11,7 @@
 # Find a validator, prefer Xerces
 VALIDATOR=""
 XMLSTARLET=`which xmlstarlet` && { VALIDATOR="XMLSTARLET"; }
-XERCESVALIDATOR=/usr/share/doc/libxml-xerces-perl/examples/validator.pl
+XERCESVALIDATOR=/usr/share/doc/libxml-xerces-perl/examples/validator.plDONTUSE
 
 if [ -f $XERCESVALIDATOR ]
 then

Modified: trunk/thml2osis/xslt/thml2osis.xslt
===================================================================
--- trunk/thml2osis/xslt/thml2osis.xslt	2007-11-30 15:47:34 UTC (rev 126)
+++ trunk/thml2osis/xslt/thml2osis.xslt	2007-11-30 15:49:52 UTC (rev 127)
@@ -486,7 +486,8 @@
        table
  -->
 
-  <xsl:template match="//ThML.body//*">
+  <!-- if we don't want to copy empty elements use this one: -->
+  <xsl:template match="//ThML.body//p">
     <!-- NB: we avoid using <xsl:copy> due to namespace issues -->
     <xsl:if test="*|text()"> <!-- don't copy empty elements -->
       <xsl:element name="{name()}">
@@ -497,4 +498,16 @@
       </xsl:element>
     </xsl:if>
   </xsl:template>
+
+
+  <xsl:template match="//ThML.body//*">
+    <!-- NB: we avoid using <xsl:copy> due to namespace issues -->
+    <xsl:element name="{name()}">
+      <xsl:call-template name="copyattributes">
+	<xsl:with-param name="exclude">id class place style</xsl:with-param>
+      </xsl:call-template>
+	<xsl:apply-templates />
+    </xsl:element>
+  </xsl:template>
+
 </xsl:stylesheet>




More information about the sword-cvs mailing list