Having two tiny files with a couple definitions didn't make
as much sense as one common file, especially since I plan to
add more definitions and use it in more places.
* docs/schemas/storageencryption.rng: Merge this...
* docs/schemas/storagefilefeatures.rng: ...and this, into...
* docs/schemas/storagecommon.rng: ...this new file.
* docs/schemas/Makefile.am (schema_DATA): Reflect renames.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/domaincommon.rng: Likewise.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
docs/schemas/Makefile.am | 5 ++---
docs/schemas/domaincommon.rng | 2 +-
.../{storageencryption.rng => storagecommon.rng} | 26 ++++++++++++++++++++--
docs/schemas/storagefilefeatures.rng | 24 --------------------
docs/schemas/storagevol.rng | 3 +--
5 files changed, 28 insertions(+), 32 deletions(-)
rename docs/schemas/{storageencryption.rng => storagecommon.rng} (52%)
delete mode 100644 docs/schemas/storagefilefeatures.rng
diff --git a/docs/schemas/Makefile.am b/docs/schemas/Makefile.am
index 47d1941..d71c327 100644
--- a/docs/schemas/Makefile.am
+++ b/docs/schemas/Makefile.am
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
+## Copyright (C) 2005-2011, 2013-2014 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
@@ -27,8 +27,7 @@ schema_DATA = \
nodedev.rng \
nwfilter.rng \
secret.rng \
- storageencryption.rng \
- storagefilefeatures.rng \
+ storagecommon.rng \
storagepool.rng \
storagevol.rng
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index bcd8142..8c1724a 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2,7 +2,7 @@
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<!-- domain-related definitions used in multiple grammars -->
<include href='basictypes.rng'/>
- <include href='storageencryption.rng'/>
+ <include href='storagecommon.rng'/>
<include href='networkcommon.rng'/>
<!--
diff --git a/docs/schemas/storageencryption.rng b/docs/schemas/storagecommon.rng
similarity index 52%
rename from docs/schemas/storageencryption.rng
rename to docs/schemas/storagecommon.rng
index fa9a8d5..54cf6b4 100644
--- a/docs/schemas/storageencryption.rng
+++ b/docs/schemas/storagecommon.rng
@@ -1,8 +1,11 @@
<?xml version="1.0"?>
-<!-- A Relax NG schema for the libvirt volume encryption XML format -->
+<!-- A Relax NG schema for common libvirt XML storage elements -->
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <!-- This schema is not designed for standalone use; another file
+ must include both this file and basictypes.rng -->
+
<define name='encryption'>
<element name='encryption'>
<attribute name='format'>
@@ -25,9 +28,28 @@
</choice>
</attribute>
<attribute name='uuid'>
- <ref name="UUID"/>
+ <ref name="UUID"/>
</attribute>
</element>
</define>
+ <define name='compat'>
+ <element name='compat'>
+ <data type='string'>
+ <param name='pattern'>[0-9]+\.[0-9]+</param>
+ </data>
+ </element>
+ </define>
+ <define name='fileFormatFeatures'>
+ <element name='features'>
+ <interleave>
+ <optional>
+ <element name='lazy_refcounts'>
+ <empty/>
+ </element>
+ </optional>
+ </interleave>
+ </element>
+ </define>
+
</grammar>
diff --git a/docs/schemas/storagefilefeatures.rng b/docs/schemas/storagefilefeatures.rng
deleted file mode 100644
index 424b4e2..0000000
--- a/docs/schemas/storagefilefeatures.rng
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!-- A Relax NG schema for the libvirt volume features XML format -->
-<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
-
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
- <define name='compat'>
- <element name='compat'>
- <data type='string'>
- <param name='pattern'>[0-9]+\.[0-9]+</param>
- </data>
- </element>
- </define>
- <define name='fileFormatFeatures'>
- <element name='features'>
- <interleave>
- <optional>
- <element name='lazy_refcounts'>
- <empty/>
- </element>
- </optional>
- </interleave>
- </element>
- </define>
-</grammar>
diff --git a/docs/schemas/storagevol.rng b/docs/schemas/storagevol.rng
index 8f07d8f..df8c1eb 100644
--- a/docs/schemas/storagevol.rng
+++ b/docs/schemas/storagevol.rng
@@ -7,8 +7,7 @@
<ref name='vol'/>
</start>
- <include href='storageencryption.rng'/>
- <include href='storagefilefeatures.rng'/>
+ <include href='storagecommon.rng'/>
<define name='vol'>
--
1.9.0