XSLT :: summary document

I have an XSL that generates an XML file

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> 
  <xsl:output method="html" indent="yes"/> 
  <xsl:template match="/"> 
    <xsl:variable name="filename" select="concat('TextTypes','.html')" />
    <xsl:result-document method="html" href="{$filename}">
      <font name="{$truncatedFont}" size="{$truncatedSize}" style="{@styleOverride}" env="{$env}" lang="{@language}" />
    </xsl:result-document>    
  </xsl:template> 
</xsl:stylesheet> 

      

When I run XSLT, I get the error:

ERROR:  'Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:result-document''
Error during transformation
javax.xml.transform.TransformerException: java.lang.RuntimeException: Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:result-document'

      

I have specified ny XSLT verision as 2.0. I am confused why I am getting this error. Please, help.

+3


source to share


3 answers


XSLT 2.0 is only supported by a few XSLT processors, I think with Java only Saxon 9 exists and with IBM websphere you can also use IBM XSLT 2.0, but XSLT processor in Oracle, SUN JRE and JDK respectively, is based on Apache Xalan and supports XSLT 1.0 only.



+3


source


It looks like your xslt processor does not support version 2.0.



0


source


It depends on how you are using nishMaria XSLT.

If you can chain the XSLT, you can process the input document multiple times to create several different output files, or create one output file with all the output you want, and then feed that file through a series of XSLTs, each of which simply selects a portion of the output.

0


source







All Articles