[libvirt] [PATCH] Replace <optional><oneOrMore> with <zeroOrMore>.

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

 



The two syntax should be equivalent, but the former creates, with trang, an
invalid Relax-NG Compact form file, as the output will contain the sequence
"+?" which is not recognized by tools like rnv.
---
 docs/schemas/domain.rng |   40 +++++++++++++++++++---------------------
 1 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 5b8f7f8..d1d3efb 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -980,27 +980,25 @@
     </attribute>
   </define>
   <define name="qemucdevSrcDef">
-    <optional>
-      <oneOrMore>
-        <element name="source">
-          <optional>
-            <attribute name="mode"/>
-          </optional>
-          <optional>
-            <attribute name="path"/>
-          </optional>
-          <optional>
-            <attribute name="host"/>
-          </optional>
-          <optional>
-            <attribute name="service"/>
-          </optional>
-          <optional>
-            <attribute name="wiremode"/>
-          </optional>
-        </element>
-      </oneOrMore>
-    </optional>
+    <zeroOrMore>
+      <element name="source">
+        <optional>
+          <attribute name="mode"/>
+        </optional>
+        <optional>
+          <attribute name="path"/>
+        </optional>
+        <optional>
+          <attribute name="host"/>
+        </optional>
+        <optional>
+          <attribute name="service"/>
+        </optional>
+        <optional>
+          <attribute name="wiremode"/>
+        </optional>
+      </element>
+    </zeroOrMore>
     <optional>
       <element name="protocol">
         <optional>
-- 
1.6.5.5

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]