Im trying to generate multiple html output files from one merged xml file with xslt 2.0
it works as expected when i have no namespace in the section
when i use the docbook namespace there are no files generated.
Does someone know why its not working with a namespace?
my xsl file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output method="text"/>
<xsl:output method="html" indent="yes" name="html"/>
<xsl:template match="/">
<xsl:for-each select="book/chapter/section">
<xsl:variable name="filename" select="concat('www/out/',@xml:id,'.html')" />
<xsl:value-of select="$filename" /> <!-- Creating -->
<xsl:result-document href="{$filename}" format="html">
<html><body>
<xsl:value-of select="title"/>
</body></html>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<book>
<chapter>
<section xmlns="http://docbook.org/ns/docbook" xml:id="lorem_1" >
<title>Lorem ipsum 1?</title>
</section>
<section xmlns="http://docbook.org/ns/docbook" xml:id="lorem_2" >
<title>Lorem ipsum 2?</title>
</section>
</chapter>
</book>
without
xmlns="http://docbook.org/ns/docbook"
it generates me 2 html files
im using Saxon 9.1.0.8J from Saxonica
build.sh
export CLASSPATH=$CLASSPATH:/usr/share/java/saxonb.jar
java net.sf.saxon.Transform -ext:on -s:www/merged.xml -xsl:www/transform.xsl -T -xi