[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [libosinfo 2/2] Correct RNG for install-script tree



From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>

* Expect 'install-script' node at toplevel in XML
* Interleave all child nodes of 'install-script' node
* Remove duplicate entries for 'id' nodes
* 'config' node has 'param' nodes under it and they have the attributes
* Remove redundant nodes that probably got there due to c&p mistake
* 'product-key-format' and 'config' nodes are optional
---
 data/schemas/libosinfo.rng | 77 +++++++++++++++++++++++-----------------------
 1 file changed, 39 insertions(+), 38 deletions(-)

diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index 455c8d5..3c57c36 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -17,6 +17,7 @@
           <ref name='os'/>
           <ref name='platform'/>
           <ref name='deployment'/>
+          <ref name='install-script'/>
         </choice>
       </zeroOrMore>
     </element>
@@ -462,48 +463,48 @@
 
   <define name='install-script'>
     <element name='install-script'>
-      <attribute name='id'>
-        <ref name='url'/>
-      </attribute>
-      <element name='profile'>
-        <text/>
-      </element>
-      <optional>
-        <element name='path-format'>
-          <ref name='path-formats'/>
-        </element>
-      </optional>
-      <optional>
-        <element name='expected-filename'>
+      <interleave>
+        <element name='profile'>
           <text/>
         </element>
-      </optional>
-      <element name='config'>
-        <attribute name="name"/>
-        <attribute name="policy">
-          <ref name='policies'/>
-        </attribute>
-      </element>
-      <element name='product-key-format'>
-        <text/>
-      </element>
-      <element name='template'>
-        <choice>
-          <group>
-            <attribute name="uri"/>
-            <empty/>
-          </group>
-          <ref name="customElement"/>
-        </choice>
-      </element>
-      <ref name='product-attr'/>
-      <ref name='product-content'/>
-      <interleave>
-        <ref name='product-dates'/>
-        <ref name='product-rel'/>
         <optional>
-          <ref name='devices-rel'/>
+          <element name='path-format'>
+            <ref name='path-formats'/>
+          </element>
+        </optional>
+        <optional>
+          <element name='expected-filename'>
+            <text/>
+          </element>
+        </optional>
+        <optional>
+          <element name='config'>
+            <oneOrMore>
+              <element name='param'>
+                <attribute name="name"/>
+                <attribute name="policy">
+                  <ref name='policies'/>
+                </attribute>
+              </element>
+            </oneOrMore>
+          </element>
         </optional>
+        <optional>
+          <element name='product-key-format'>
+            <text/>
+          </element>
+        </optional>
+        <element name='template'>
+          <choice>
+            <group>
+              <attribute name="uri"/>
+              <empty/>
+            </group>
+            <ref name="customElement"/>
+          </choice>
+        </element>
+        <ref name='product-attr'/>
+        <ref name='product-rel'/>
       </interleave>
     </element>
   </define>
-- 
1.8.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]