xml-toolkit 1.0.4 → 1.0.5

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.
@@ -313,7 +313,9 @@ const XMLMarshaller = class {
313
313
 
314
314
  if (element) {
315
315
 
316
- for (const e of Array.isArray (element) ? element : [element]) {
316
+ for (let e of Array.isArray (element) ? element : [element]) {
317
+
318
+ const {ref} = e; if (ref) e = this.xs.getByReference (ref)
317
319
 
318
320
  const c = content [e.name]
319
321
 
package/lib/XMLSchema.js CHANGED
@@ -86,6 +86,7 @@ XMLSchema.adjustNode = node => {
86
86
 
87
87
  case 'attribute':
88
88
  case 'element':
89
+ splitNs ('ref')
89
90
  splitNs ('type')
90
91
  break
91
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xml-toolkit",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Collection of classes for dealing with XML",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test/test.js CHANGED
@@ -255,7 +255,10 @@ async function test_005_schemata (fn) {
255
255
 
256
256
  console.log (xs.stringify (
257
257
 
258
- {childDotation2Request: {
258
+ {childDotation2Request: {
259
+ Message: {
260
+ TestMsg: "Тестовый запроc",
261
+ },
259
262
  MessageData: {
260
263
  AppData: {
261
264
  info
@@ -281,7 +284,7 @@ async function main () {
281
284
  // await test_003_emitter_sync ('not-sa01.xml')
282
285
  // await test_003_emitter_sync ('ent.xml')
283
286
  // await test_003_emitter_sync ('soap.xml')
284
- // await test_004_schemata ()
287
+ await test_004_schemata ()
285
288
  await test_005_schemata ()
286
289
 
287
290
  }