lutaml-model 0.8.114 → 0.8.115

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 381cba1519b14ff18965d44164e7d75e4564ac92c803815dad95277b7076ef70
4
- data.tar.gz: acd3466cbc30ed27ce60ce62b181732ab957abde427da1e609003ced88c47a67
3
+ metadata.gz: b924b08953808c53f7f6db9f9832ffa870b11a5d2c7fe450b1340d8b2f289562
4
+ data.tar.gz: 3ba1f1afe7b2a95e83f137f8d3944e56e0ba516962b261665c4c3b91de74824f
5
5
  SHA512:
6
- metadata.gz: 8f48a3c4bc8a0242a714d945aae2aaca68ae6c0a8a87cedb038a1229363545bb41f1a3c24f833db86c89e3468cc216c77536af23385cce37e6ce20f8a2e3b142
7
- data.tar.gz: 9ba5616b479da6952fd44284792ce708712ed6576ba90fa11507581aefd344f30ccd22e5887e3200c714feff15e7e8c95742149f49ac2a5618b2d5ea0f0b742a
6
+ metadata.gz: 2d956aca0be2bdbae7e513391962490429057f04ca4371be1477d4bbc29e79f8ad942beffbb40debf27db64f7be7e7c301110832439a3ece8eb4ece5e6c673d9
7
+ data.tar.gz: 7a384e7b06e927f9b78a129914de369c2befa23b14e84c6a9c2ba24e769c145dd0b0814fa3f92483516132020ced34c885c71872c251d41a8bdc6dff995b41db
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Model
5
- VERSION = "0.8.114"
5
+ VERSION = "0.8.115"
6
6
  end
7
7
  end
@@ -62,7 +62,12 @@ module Lutaml
62
62
  # (namespaced spellings are instance-dependent; ordered,
63
63
  # wildcard, raw, and callback shapes are not
64
64
  # ops-expressible).
65
- return NativeEmission.emit(instance, plan, register) if NativeEmission.compatible?(plan)
65
+ # element_order is the order contract: a model carrying it —
66
+ # parse-captured or programmatically tracked (#977) — must
67
+ # serialize through the ordered walk, not the flat
68
+ # schema-order native ops layout.
69
+ return NativeEmission.emit(instance, plan, register) if
70
+ NativeEmission.compatible?(plan) && instance.element_order.nil?
66
71
 
67
72
  doc = ::Leptris::XML::Document.create
68
73
  ns_ctx = Namespaces.new(instance, plan, register)
@@ -85,7 +90,7 @@ module Lutaml
85
90
  root.set_attribute("xsi:schemaLocation",
86
91
  instance.raw_schema_location)
87
92
  end
88
- built = if plan[:ordered]
93
+ built = if plan[:ordered] || !instance.element_order.nil?
89
94
  build_ordered(root, instance, plan, doc, register, ns_ctx)
90
95
  else
91
96
  build(root, instance, plan, doc, register, ns_ctx)
@@ -310,7 +315,7 @@ module Lutaml
310
315
  ns_ctx ? ns_ctx.spell(row_name(rule, spelling), child_ns) : row_name(rule, spelling),
311
316
  )
312
317
  ns_ctx&.collect(child_plan[:tree])
313
- if child_plan[:ordered]
318
+ if child_plan[:ordered] || !item.element_order.nil?
314
319
  build_ordered(child, item, child_plan,
315
320
  doc, reg, ns_ctx, child_ns) || return
316
321
  else
@@ -522,7 +527,7 @@ module Lutaml
522
527
  child = element.create_child(
523
528
  ns_ctx ? ns_ctx.spell(object.name, child_ns) : object.name,
524
529
  )
525
- if child_plan[:ordered]
530
+ if child_plan[:ordered] || !item.element_order.nil?
526
531
  return nil unless build_ordered(child, item, child_plan,
527
532
  doc, reg, ns_ctx, child_ns)
528
533
  else
@@ -580,7 +585,7 @@ module Lutaml
580
585
  child = element.create_child(
581
586
  ns_ctx ? ns_ctx.spell(name, child_ns) : name,
582
587
  )
583
- if child_plan[:ordered]
588
+ if child_plan[:ordered] || !item.element_order.nil?
584
589
  return nil unless build_ordered(child, item, child_plan,
585
590
  doc, reg, ns_ctx, child_ns)
586
591
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.114
4
+ version: 0.8.115
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-18 00:00:00.000000000 Z
11
+ date: 2026-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64