Actions
Bug #6456
open![Author: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
parse-xml-fragment() is not implemented in SaxonCS
Start date:
2024-06-21
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
.NET
Description
It seems that under SaxonCS, parse-xml-fragment() always returns an empty sequence.
Updated by Martin Honnen 25 days ago
For me, it seems implemented in 12.4 and certainly parses XML fragment:
PS C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\parse-xml-fragment> type .\sample1.xml
<root><![CDATA[This is a test with some <b>bold</b> text.]]></root>
PS C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\parse-xml-fragment> type .\parse-xml-fragment-test1.xq
parse-xml-fragment(.)
PS C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\parse-xml-fragment> & 'C:\Program Files\Saxonica\SaxonCS-12.4\SaxonCS.exe' query -s:.\sample1.xml -q:.\parse-xml-fragment-test1.xq
<?xml version="1.0" encoding="UTF-8"?>This is a test with some <b>bold</b> text.
Updated by Michael Kay 25 days ago
Ah, I see now what's happening. The class net.sf.saxon.functions.ParseXmlFragment.cs says:
public override Saxon.Hej.om.Sequence call(Saxon.Hej.expr.XPathContext context, Saxon.Hej.om.Sequence[] arguments) {
return Saxon.Hej.value.EmptySequence.getInstance(); // TODO: implement me!
}
But XPath30FunctionSet.java in fact directs calls to a different class Saxon.Impl.Helpers.ParseXmlFragment
. The problem only appeared (on the 13.x branch) when I tried to implement the new 4.0 2-argument form of the function without that redirection.
Please register to edit this issue
Actions