Project

Profile

Help

Bug #4704

closed

parse-xml fails in browser on string that has XML declaration in CDATA section

Added by Martin Honnen over 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
XPath Conformance
Sprint/Milestone:
Start date:
2020-09-01
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
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

Also available in: Atom PDF Tracking page