[elbe-devel] [PATCH] schema: set raw-preference to maxOccurs=1

Manuel Traut manut at linutronix.de
Thu Jul 12 16:14:08 CEST 2018


currently the element can be inserted multiple times, the code handles
this correctly. However it avoids using the out 'all' tag instead of
'sequence' because 'all' just allows maxOccurs=1. Having a less strict
ordering in XML seems for me more useful than multiple occurance of the
rarely documented 'raw-preference' element. However this is a change of
the schema that makes it incompatible with the old one.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 schema/dbsfed.xsd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
index 3e1d3157..eaf707f1 100644
--- a/schema/dbsfed.xsd
+++ b/schema/dbsfed.xsd
@@ -384,7 +384,7 @@
         rootfilesystem and include the definition of the build environment
       </documentation>
     </annotation>
-    <sequence>
+    <all>
       <element name="name" type="rfs:string" minOccurs="0">
         <annotation>
           <documentation>
@@ -435,7 +435,7 @@
           </documentation>
         </annotation>
       </element>
-      <element name="raw-preference" type="rfs:raw-preference" minOccurs="0" maxOccurs="unbounded">
+      <element name="raw-preference" type="rfs:raw-preference" minOccurs="0">
         <annotation>
           <documentation>
             gets dedented and striped and is then written to /etc/apt/preferences
@@ -467,7 +467,7 @@
           </documentation>
         </annotation>
       </element>
-    </sequence>
+    </all>
     <attribute ref="xml:base"/>
   </complexType>
 
-- 
2.18.0




More information about the elbe-devel mailing list