When i change the xsl:include
to xsl:import
it somehow works and doesnt return an empty file. I am using the Xslt30Processor
class and function Xslt30Processor::TransformFiletoFile()
, even The transform.c
doesnt work. When my xslt has a "xsl:result-document"
statement it also doesnt work.
I even tried using a previous version of Saxon/C (The 1.2.0 series) , and even that didnt work. Is there any option where it enables the use of xsl:include
or something.
This works for Java and .NET but not for the C API. I don't get any errors or exceptions when using JNI. Please help.
Here a small example which demostrates the problem:
source.xml
:
<xml/>
main.xsl
:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" encoding="utf-8" standalone="yes"/>
<xsl:include href="referenced.xsl" />
<xsl:template match="/">hello</xsl:template>
</xsl:stylesheet>
referenced.xsl
:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:f="my-functions.org"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.0">
<xsl:function name="f:next-nr" as="xs:integer">
<xsl:param name="node"/>
<xsl:sequence select="xs:integer(replace($node, '\D', ''))"/>
</xsl:function>
</xsl:stylesheet>
When running the C version of Transform.exe
, no errors are returned and no output is produced. I noticed when putting together this test case that it doesn't matter if I change the include to import for this example. If I use the Transform.exe that comes in the tools folder of Saxon 10.6, a file is produced as expected. I can't, however, find any C/C++ files for Saxon 10.6.
The issue with result-document is a separate issue with the same outcome.
xsl:include
andxsl:result-document
are related. Perhaps ask two different questions, for each show minimal but complete samples to allow others to reproduce the problem.transform.c
doesn't work for you, can you show us minimal samples plus the exact error message you get?