You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a namespace misalignment when creating child element with .ele and when importing fragment child using .import.
To Reproduce
⚙️ Try to run following functions and compare their outputs.
Function called "workingExample" outputs properly.
functionworkingExample(){constdoc=create({version: '1.0'});constroot=doc.ele('ns1','Root');// creates Child element with proper namespace set to "ns2"root.ele('ns2','Child').txt('text');returndoc.end({prettyPrint: true})}
Function called "notWorkingExample" outputs child element without namespace.
functionnotWorkingExample(){constdoc=create({version: '1.0'});constroot=doc.ele('ns1','Root');// inserts Child element (fragment) but namespace 'ns2' is omittedconstchild=fragment().ele('ns2','Child').txt('text');root.import(child);returndoc.end({prettyPrint: true})}
⚠️ Output of notWorkingExample function that is NOK:
Describe the bug
There is a namespace misalignment when creating child element with
.ele
and when importing fragment child using.import
.To Reproduce
⚙️ Try to run following functions and compare their outputs.
✅ Output of
workingExample
function that is OK:notWorkingExample
function that is NOK:Expected behavior
Output of
notWorkingExample
function is equal to output ofworkingExample
= both functions output:Version:
The text was updated successfully, but these errors were encountered: