[virt-tools-list] [libosinfo PATCHv3 03/12] Add datamaps to rng for validation

Christophe Fergeau cfergeau at redhat.com
Wed Dec 12 15:18:33 UTC 2012


---
 data/schemas/libosinfo.rng | 19 +++++++++++++++++++
 test/test-xml-validate     |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index 51b0c20..e72ca7d 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -13,6 +13,7 @@
 
       <zeroOrMore>
         <choice>
+          <ref name='datamap'/>
           <ref name='device'/>
           <ref name='os'/>
           <ref name='platform'/>
@@ -23,6 +24,24 @@
     </element>
   </define>
 
+  <define name='datamap'>
+    <element name='datamap'>
+      <attribute name='id'>
+        <ref name='url'/>
+      </attribute>
+      <oneOrMore>
+        <element name='entry'>
+          <attribute name='inval'>
+            <text/>
+          </attribute>
+          <attribute name='outval'>
+            <text/>
+          </attribute>
+        </element>
+      </oneOrMore>
+    </element>
+  </define>
+
   <define name='device'>
     <element name='device'>
       <attribute name='id'>
diff --git a/test/test-xml-validate b/test/test-xml-validate
index 8f16f1c..a2d20b4 100755
--- a/test/test-xml-validate
+++ b/test/test-xml-validate
@@ -42,7 +42,7 @@ exit $ret
 : ${srcdir=.}
 . $srcdir/test-lib.sh
 
-DIRS="oses hypervisors devices install-scripts"
+DIRS="datamaps oses hypervisors devices install-scripts"
 SCHEMA="libosinfo.rng"
 
 check_schema "$DIRS" "$SCHEMA"
-- 
1.8.0.1




More information about the virt-tools-list mailing list