Project

Profile

Help

Bug #5066

Element.localName is not implemented in saxon-js 2.3

Added by Michael Gunter 2 months ago. Updated 2 months ago.

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

0%

Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
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
    }

});

History

#1 Updated by Michael Gunter 2 months ago

The example can be further reduced to the following.

import saxon from "saxon-js";

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

    console.log(document.documentElement.localName); // this prints "data" on 2.0.3, but prints "undefined" on 2.3

});

#2 Updated by Michael Gunter 2 months ago

The issue appears to have been introduced in version 2.1.

#3 Updated by Norm Tovey-Walsh 2 months ago

Thanks for the reproducible case. We'll take a look as soon as possible.

Please register to edit this issue

Also available in: Atom PDF Tracking page