lutaml / lutaml-model

LutaML Model is the Ruby data modeler part of the LutaML data modeling suite. It supports creating serialization object models (XML, YAML, JSON, TOML) and mappings to and from them.
Other
1 stars 0 forks source link

Implement fixed/relaxed element ordering option in XML #4

Open ronaldtse opened 3 months ago

ronaldtse commented 3 months ago

Implemented by @HassanAkbar at:

HassanAkbar commented 2 months ago

@ronaldtse Is this same as https://github.com/lutaml/lutaml-model/pull/19? or is there something else needed to be done in this ticket?

ronaldtse commented 1 month ago

Yes, in some XML objects (depending on our implementation of course) the element order doesn't matter, e.g.

e.g. https://github.com/relaton/loc_mods/blob/main/spec/fixtures/allrecords-MODS-991000030349708106.xml

      <subject authority="lcsh" xlink:href="https://id.loc.gov/authorities/names/n78095330-781">
         <topic>Mollusks</topic>
         <topic>Effect of water pollution on</topic>
         <geographic>United States</geographic>
      </subject>

vs

      <subject authority="lcsh" xlink:href="https://id.loc.gov/authorities/names/n78095330-781">
         <geographic>United States</geographic>
         <topic>Mollusks</topic>
         <topic>Effect of water pollution on</topic>
      </subject>

In some XML elements, the order of inner elements matter. We need to support both modes.