xml-toolkit 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -149,7 +149,7 @@ const XMLSchemata = class extends Map {
149
149
 
150
150
  let targetNamespace = node.attributes.targetNamespace || options.targetNamespace
151
151
 
152
- if (!this.has (targetNamespace)) this.set (targetNamespace, new XMLSchema (this, targetNamespace))
152
+ if (targetNamespace && !this.has (targetNamespace)) this.set (targetNamespace, new XMLSchema (this, targetNamespace))
153
153
 
154
154
  const {addLocation} = options; for (const {localName, namespaceURI, attributes} of node.children)
155
155
 
@@ -157,7 +157,7 @@ const XMLSchemata = class extends Map {
157
157
 
158
158
  addLocation (attributes.schemaLocation, attributes.namespace)
159
159
 
160
- this.get (targetNamespace).add (node)
160
+ if (targetNamespace) this.get (targetNamespace).add (node)
161
161
 
162
162
  }
163
163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xml-toolkit",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Collection of classes for dealing with XML",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test/test.js CHANGED
@@ -392,6 +392,8 @@ async function test_009_schemata (fn) {
392
392
 
393
393
  console.log (xs)
394
394
 
395
+ console.log (xs.stringify ({AckResponse: null}))
396
+
395
397
  }
396
398
 
397
399
  function test_010_node () {