summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xthml2osis/xslt/tests/runtests.sh2
-rw-r--r--thml2osis/xslt/thml2osis.xslt15
2 files changed, 15 insertions, 2 deletions
diff --git a/thml2osis/xslt/tests/runtests.sh b/thml2osis/xslt/tests/runtests.sh
index 5b3f5b6..adb6b80 100755
--- a/thml2osis/xslt/tests/runtests.sh
+++ b/thml2osis/xslt/tests/runtests.sh
@@ -11,7 +11,7 @@ XSD=osisCore.2.1.1.xsd
# 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
diff --git a/thml2osis/xslt/thml2osis.xslt b/thml2osis/xslt/thml2osis.xslt
index 0f61ac4..01c3b91 100644
--- a/thml2osis/xslt/thml2osis.xslt
+++ b/thml2osis/xslt/thml2osis.xslt
@@ -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>