diff options
author | Luke S. <luke@motimail.com> | 2007-11-30 15:49:52 +0000 |
---|---|---|
committer | Luke S. <luke@motimail.com> | 2007-11-30 15:49:52 +0000 |
commit | 1d01504d6be54f8e6dd0cbe45bb7787378aba64f (patch) | |
tree | f4cd1618ee5a4ea027551227ae5334fcd75a4b59 /thml2osis/xslt | |
parent | 12168927d7354eb5f432d9137feddb57bbf675ff (diff) | |
download | sword-tools-1d01504d6be54f8e6dd0cbe45bb7787378aba64f.tar.gz |
Reworkeed last patch to more careful.
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@127 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'thml2osis/xslt')
-rwxr-xr-x | thml2osis/xslt/tests/runtests.sh | 2 | ||||
-rw-r--r-- | thml2osis/xslt/thml2osis.xslt | 15 |
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> |