Open mikaa123 opened 10 years ago
I am not an xslty user, but I came across this report looking into the same issue for another context.
When a string containing XML is passed to Saxon-CE, the resulting XML document has a null document.baseURI property, meaning that any nodes in an XSL stylesheet inheriting from that value, probably including that xsl:import node, will have the same. Since your import statement probably has a relative URI (and no explicit @xml:base value), that URI cannot be resolved.
There are a few ways that this can be worked around from what I can tell:
1) [for xslty.js] Send Saxon-CE an XML document (XSL styelsheet) using the call
var xslt = Saxon.requestXML(system.args[2]);
instead, where the XSL stylesheet path was passed in in that arg. This will allow the parsed XML document to have a valid baseURI.
2) [for end-user usage] Use an absolute path for the xsl:import statement, or set an @xml:base attribute value for the xsl:stylesheet node. For example,
<xsl:stylesheet version="2.0" xml:base="file:///path.to.stylesheet.xsl">
I haven't tested any of this, but I am fairly certain either should be a fix.
Hey there! First, let me thank you for this great tool. It's extremely valuable to what I am doing.
I am having an issue regarding xsl:import tags.
Throws the following error:
Not sure if this problem is directly linked to
xslty
.Anyway, thank you and have a great day!