Project

Profile

Help

Bug #5066

closed

Element.localName is not implemented in saxon-js 2.3

Added by Michael Gunter over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-08-21
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

I am currently using saxon-js 2.0.3, and my project runs without issues. I am trying to upgrade to 2.3, but I have encountered what I believe is a bug. It can be demonstrated as follows.

import saxon from "saxon-js";

const text = "<index>\
    <entry name='A' />\
    <entry name='B' />\
    <entry name='C' />\
</index>";

saxon.getResource({ text, type: "xml" })
.then(document => {

    const elements = saxon.XPath.evaluate("entry", document.documentElement);

    for (const element of elements) {
        console.log(element.localName); // this prints "entry" on 2.0.3, but prints "undefined" on 2.3
    }

});

Please register to edit this issue

Also available in: Atom PDF Tracking page