Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't care on ordering of lists in the XML file #68

Closed
manut opened this issue Apr 28, 2016 · 2 comments
Closed

don't care on ordering of lists in the XML file #68

manut opened this issue Apr 28, 2016 · 2 comments
Milestone

Comments

@manut
Copy link
Contributor

manut commented Apr 28, 2016

the code is flexible enough, just reworking the XML schema is needed

@manut manut added this to the elbe2 milestone Apr 28, 2016
@manut manut modified the milestones: elbe2, elbe3 Mar 30, 2017
@manut
Copy link
Contributor Author

manut commented Apr 5, 2018

hint from bene, but untested:

diff --git a/elbepack/dbsfed.xsd b/elbepack/dbsfed.xsd
index 8582e7c..42c166b 100644
--- a/elbepack/dbsfed.xsd
+++ b/elbepack/dbsfed.xsd
@@ -20,7 +20,7 @@
       includes all subelements to define the elbe project
       </documentation>
     </annotation>
-    <sequence>
+    <all>
       <element name="initvm" type="rfs:initvm" minOccurs="0">
         <annotation>
           <documentation>
@@ -110,7 +110,7 @@
           </documentation>
         </annotation>
       </element>
-    </sequence>
+    </all>
     <attribute name="created" type="dateTime">
       <annotation>
         <documentation>

@manut manut added the 529 label Apr 27, 2018
manut pushed a commit that referenced this issue Jul 31, 2018
'sequence' requires that each element appears multiple times or
not at all and cares on ordering of the elements. It also eases coding.
E.g. 'chg_archive' should insert the 'archive' on the correct position.
However the source-code always appends it to the end. That might lead to
validation errors, if there is another element before.

The ordering is not required by the elbe source code the parses the XML
for most cases and it's easier for humans if there is no required ordering
of the elements.

However, 'all' requires that each element appears only once or doesn't occure
at all. So it can't be used in all places that uses 'sequence' currently.
However in most places it is fine to use 'all' instead of 'sequence'.

This fixes issue #68 on github.

Signed-off-by: Manuel Traut <manut@linutronix.de>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
@manut
Copy link
Contributor Author

manut commented Dec 3, 2018

closed by b190f3e

@manut manut closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant