libvirt/docs/schemas/domain.rng

22 lines
683 B
Plaintext
Raw Normal View History

<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
conf: set up for per-grammar overrides in schemas This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that source do not support the same subset of functionality. By starting with something fairly easy to validate, I can make sure my later patches will be possible. This patch adds a use of the no-op <ref name='sourceStartupPolicy'/> to the disksnapshot definition, so that the snapshot version of a type='file' <source> more closely resembles the version in domaincommon. A future patch will merge the two files into using a common define, but this patch is sufficient for testing that adding <source startupPolicy='optional'/> in any of the tests/domainsnapshotxml2xmlin/*.xml files still gets rejected unless it occurs within the <domain> subelement, because the definition of startupPolicy is empty outside of domain.rng. * docs/schemas/storagecommon.rng (storageStartupPolicy) (storageSourceExtra): Create no-op defaults. * docs/schemas/domainsnapshot.rng (domain): Use nested grammar to avoid restricting <domain>. (storageSourceExtra): Create new override. (disksnapshot): Access overrides through common names. * docs/schemas/domaincommon.rng (disk): Access overrides through common names. * docs/schemas/domain.rng (storageStartupPolicy) (storageSourceExtra): Create new overrides. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2014-04-14 22:54:15 +00:00
<!-- Grammar for accepting a domain element, both as top level, and
also suitable for inclusion in domainsnapshot.rng -->
<start>
<ref name="domain"/>
</start>
<include href="domaincommon.rng"/>
conf: set up for per-grammar overrides in schemas This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that source do not support the same subset of functionality. By starting with something fairly easy to validate, I can make sure my later patches will be possible. This patch adds a use of the no-op <ref name='sourceStartupPolicy'/> to the disksnapshot definition, so that the snapshot version of a type='file' <source> more closely resembles the version in domaincommon. A future patch will merge the two files into using a common define, but this patch is sufficient for testing that adding <source startupPolicy='optional'/> in any of the tests/domainsnapshotxml2xmlin/*.xml files still gets rejected unless it occurs within the <domain> subelement, because the definition of startupPolicy is empty outside of domain.rng. * docs/schemas/storagecommon.rng (storageStartupPolicy) (storageSourceExtra): Create no-op defaults. * docs/schemas/domainsnapshot.rng (domain): Use nested grammar to avoid restricting <domain>. (storageSourceExtra): Create new override. (disksnapshot): Access overrides through common names. * docs/schemas/domaincommon.rng (disk): Access overrides through common names. * docs/schemas/domain.rng (storageStartupPolicy) (storageSourceExtra): Create new overrides. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2014-04-14 22:54:15 +00:00
<define name="storageStartupPolicy" combine="choice">
conf: set up for per-grammar overrides in schemas This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that source do not support the same subset of functionality. By starting with something fairly easy to validate, I can make sure my later patches will be possible. This patch adds a use of the no-op <ref name='sourceStartupPolicy'/> to the disksnapshot definition, so that the snapshot version of a type='file' <source> more closely resembles the version in domaincommon. A future patch will merge the two files into using a common define, but this patch is sufficient for testing that adding <source startupPolicy='optional'/> in any of the tests/domainsnapshotxml2xmlin/*.xml files still gets rejected unless it occurs within the <domain> subelement, because the definition of startupPolicy is empty outside of domain.rng. * docs/schemas/storagecommon.rng (storageStartupPolicy) (storageSourceExtra): Create no-op defaults. * docs/schemas/domainsnapshot.rng (domain): Use nested grammar to avoid restricting <domain>. (storageSourceExtra): Create new override. (disksnapshot): Access overrides through common names. * docs/schemas/domaincommon.rng (disk): Access overrides through common names. * docs/schemas/domain.rng (storageStartupPolicy) (storageSourceExtra): Create new overrides. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2014-04-14 22:54:15 +00:00
<!-- overrides the no-op version in storagecommon.rng -->
<ref name="startupPolicy"/>
conf: set up for per-grammar overrides in schemas This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that source do not support the same subset of functionality. By starting with something fairly easy to validate, I can make sure my later patches will be possible. This patch adds a use of the no-op <ref name='sourceStartupPolicy'/> to the disksnapshot definition, so that the snapshot version of a type='file' <source> more closely resembles the version in domaincommon. A future patch will merge the two files into using a common define, but this patch is sufficient for testing that adding <source startupPolicy='optional'/> in any of the tests/domainsnapshotxml2xmlin/*.xml files still gets rejected unless it occurs within the <domain> subelement, because the definition of startupPolicy is empty outside of domain.rng. * docs/schemas/storagecommon.rng (storageStartupPolicy) (storageSourceExtra): Create no-op defaults. * docs/schemas/domainsnapshot.rng (domain): Use nested grammar to avoid restricting <domain>. (storageSourceExtra): Create new override. (disksnapshot): Access overrides through common names. * docs/schemas/domaincommon.rng (disk): Access overrides through common names. * docs/schemas/domain.rng (storageStartupPolicy) (storageSourceExtra): Create new overrides. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2014-04-14 22:54:15 +00:00
</define>
<define name="storageSourceExtra" combine="choice">
conf: set up for per-grammar overrides in schemas This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that source do not support the same subset of functionality. By starting with something fairly easy to validate, I can make sure my later patches will be possible. This patch adds a use of the no-op <ref name='sourceStartupPolicy'/> to the disksnapshot definition, so that the snapshot version of a type='file' <source> more closely resembles the version in domaincommon. A future patch will merge the two files into using a common define, but this patch is sufficient for testing that adding <source startupPolicy='optional'/> in any of the tests/domainsnapshotxml2xmlin/*.xml files still gets rejected unless it occurs within the <domain> subelement, because the definition of startupPolicy is empty outside of domain.rng. * docs/schemas/storagecommon.rng (storageStartupPolicy) (storageSourceExtra): Create no-op defaults. * docs/schemas/domainsnapshot.rng (domain): Use nested grammar to avoid restricting <domain>. (storageSourceExtra): Create new override. (disksnapshot): Access overrides through common names. * docs/schemas/domaincommon.rng (disk): Access overrides through common names. * docs/schemas/domain.rng (storageStartupPolicy) (storageSourceExtra): Create new overrides. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2014-04-14 22:54:15 +00:00
<!-- overrides the no-op version in storagecommon.rng -->
<ref name="diskspec"/>
conf: set up for per-grammar overrides in schemas This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that source do not support the same subset of functionality. By starting with something fairly easy to validate, I can make sure my later patches will be possible. This patch adds a use of the no-op <ref name='sourceStartupPolicy'/> to the disksnapshot definition, so that the snapshot version of a type='file' <source> more closely resembles the version in domaincommon. A future patch will merge the two files into using a common define, but this patch is sufficient for testing that adding <source startupPolicy='optional'/> in any of the tests/domainsnapshotxml2xmlin/*.xml files still gets rejected unless it occurs within the <domain> subelement, because the definition of startupPolicy is empty outside of domain.rng. * docs/schemas/storagecommon.rng (storageStartupPolicy) (storageSourceExtra): Create no-op defaults. * docs/schemas/domainsnapshot.rng (domain): Use nested grammar to avoid restricting <domain>. (storageSourceExtra): Create new override. (disksnapshot): Access overrides through common names. * docs/schemas/domaincommon.rng (disk): Access overrides through common names. * docs/schemas/domain.rng (storageStartupPolicy) (storageSourceExtra): Create new overrides. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2014-04-14 22:54:15 +00:00
</define>
</grammar>