Hello,
I'm experiencing an annoying problem when transforming a document
using Saxonb-9.1 (I've not found a way to use the newer versions with
Ant, is there any?).
Let's say i'd like to apply a template to a node set and wrap the
result with an <ul> element (or any other):
<ul>
<xsl:apply-templates select="m:node"/>
</ul>
It works fine, except that if there is no "m:node"-Element to be
found, the <ul> is not closed immediately, but only at the very end of
the resulting document (thus making it correct xhtml again, by chance
probably), destroying the output.
A possible workaround is:
<xsl:if test="m:node">
<ul>
<xsl:apply-templates select="m:node"/>
</ul>
</xsl:if>
But i don't see why that should be obligatory.
I'm using xslt 2.0, saxonb-9.1, ant;
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0" xmlns="http://www.w3.org/1999/xhtml"
xmlns:m="http://www.uni-augsburg.de/2010/Modulhandbuch"
exclude-result-prefixes="m">
<xsl:output name="handbuch-format" method="xml" indent="yes"
encoding="UTF-8"
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
doctype-public="-//W3C//DTD XHTML 1.1//EN" />
Thank you very much,
Andreas Knote
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--