Page 1 of 1

xsl result-doc does not write results to file...

Posted: Tue Sep 19, 2006 8:54 pm
by wilkinsr
I'm trying to use xsl result-document to output to multiple files. I'm running this stylesheet:

<?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="//testrun">
<xsl:variable name="filename"
select="concat('c:/',@run,'.html')" />
<xsl:value-of select="$filename" /> <!-- Creating -->
<xsl:result-document href="{$filename}" format="html">
<html><body>
<xsl:value-of select="@run"/>
</body></html>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Against this xml:

<?xml version="1.0" encoding="UTF-8"?>
<tests>
<testrun run="test1">
<test name="foo" pass="true" />
<test name="bar" pass="true" />
<test name="baz" pass="true" />
</testrun>
<testrun run="test2">
<test name="foo" pass="true" />
<test name="bar" pass="false" />
<test name="baz" pass="false" />
</testrun>
<testrun run="test3">
<test name="foo" pass="false" />
<test name="bar" pass="true" />
<test name="baz" pass="false" />
</testrun>
</tests>

I'm working in Eclipse 3.1.2, running jdk 1.5, and using Saxon 8B as the transformer. Saxon seems to be processing correctly, but I don't get any physical files. The output tab lists the correct path and file name, but no files. Any suggestions?

By the way, Saxon 8.8 is now available. Are there any upgrade instructions posted out there?

Posted: Fri Sep 22, 2006 4:10 pm
by sorin_ristache
Hello,

The XSLT problem is a duplicate of this post.

About Saxon 8.8: an oXygen version integrates the latest version of Saxon available at release time. The full integration provided by a released version of oXygen is much more than dropping the saxon jar files in the lib folder. So for the full integration (debugging with Saxon 8.8, validation, transformation) you will have to wait until the next oXygen release. However you can use any version Saxon 8.x as an external tool for validation of XSLT and XQuery files and transformation by configuring it in Options -> Preferences -> Editor -> Custom Validation and Options -> Preferences -> XML -> XSLT/FO/XQuery -> Custom Engines.


Regards,
Sorin