From ad5c4be09fe415b4161c4b04ca2ef96f30a0509b Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 13 Oct 2022 14:01:24 +0200 Subject: [PATCH] schema: Re-structure schema for to avoid broken validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The validation of a '' device fails if the elements inside are not ordered in the order in the schema despite using . This is a bug in libxml2's validator as removing the '' property from the definition of the 'type' attribute with 'mount' variable fixes the problem. I've reported it as another instance of a seemingly related issue: https://gitlab.gnome.org/GNOME/libxml2/-/issues/131 Meanwhile libvirt can re-arrange the schema by extracting the common bits into a new definition and referencing them from each of the choice groups explicitly. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/392 Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Daniel P. Berrangé --- src/conf/schemas/domaincommon.rng | 385 +++++++++++++++--------------- 1 file changed, 196 insertions(+), 189 deletions(-) diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 5ff15e8787..d346442510 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -2860,205 +2860,212 @@ + + + + + + + + + + + passthrough + mapped + squash + + + + + + + default + remap + forbid + warn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - file - - - - - - - - - - - - - - - - block - - - - - - - - - - - - - - - + + + + virtio + virtio-transitional + virtio-non-transitional + + + + + + + file + + - - mount - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - bind + + + - - - - - - - - - - - - - - - - template - - - - - - - - - - - - - - - - ram - - - - - - - - - - - - - - - - - - - - - - - - - - - - passthrough - mapped - squash - - - - - - - default - remap - forbid - warn - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - virtio - virtio-transitional - virtio-non-transitional - + + + + + + block - - + + + + + + + + + + + + + + + + + + mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bind + + + + + + + + + + + + + + + + + + template + + + + + + + + + + + + + + + + + ram + + + + + + + + + + + + + + + + + + + + +