Actions
Bug #4704
closed![Author: Martin Honnen](https://www.gravatar.com/avatar/3ea75023c3c487f36257090d420b7c50?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Debbie Lockett](https://www.gravatar.com/avatar/9c2ec304a5bec55af709863d87d5f6b7?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
parse-xml fails in browser on string that has XML declaration in CDATA section
Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath Conformance
Sprint/Milestone:
Start date:
2020-09-01
Due date:
% Done:
100%
Estimated time:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-
Description
With Saxon JS 2 in the browser (tested with Chrome 84), the JavaScript code
SaxonJS.XPath.evaluate(`parse-xml($xml)`, [], { params : { 'xml' : `<root><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<a/>
<a/>]]></root>` }})
fails for me with
SaxonJS2.rt.js:548 Uncaught q {message: "Misplaced or malformed XML", stack: "Error↵ at new q (http://saxonica.com/saxon-js/d…S/SaxonJS2.rt.js:789:494)↵ at <anonymous>:1:15", name: "XError", code: "FODC0006"}
I think the parsing should work without giving any error.
Please register to edit this issue
Actions
Also available in: Atom PDF Tracking page