Hi, I'm new to the XSLT 2.0, and I would like to use the new result-document tag to create multiple output files. However, when I try to do so, I get an error message saying :"E Unknown XSLT element: reslut-document"
I've made sure I selected "2.0" from the drop-down menu when I created the xsl file and I also specified the correct version in the stylesheet tag.
Any help on that matter would be greatly appreciated,
Thanks in advance.
Unknown SXLT element: result-document
Hi,
result-document should work, try the following stylesheet:
You just have to make sure the version attribute is set to 2.0, oXygen changes dymanically the support from/to 2.0 to/from 1.0 depending on the version attribute value.
Best Regards,
George
result-document should work, try the following stylesheet:
Code: Select all
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
<xsl:result-document href="test.txt"> test </xsl:result-document>
</xsl:template>
</xsl:stylesheet>
Best Regards,
George
Thanks for your reply, but I still can't get it to work.
I wanted to experiment with it before I started to work on my project, so I found an example somewhere. Here's what I've got :
Whenever I try to parse the file I get the error mentionned in my previous post.
I wanted to experiment with it before I started to work on my project, so I found an example somewhere. Here's what I've got :
Code: Select all
<?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('output1/',@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>