[PATCH] schema: Re-structure schema for <filesystem> to avoid broken validation

Ján Tomko jtomko at redhat.com
Thu Oct 13 13:16:42 UTC 2022

On a Thursday in 2022, Peter Krempa wrote:
>The validation of a '<filesystem type='mount'>' device fails if the
>elements inside are not ordered in the order in the schema despite using
><interleave>. This is a bug in libxml2's validator as removing the
>'<optional>' 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 <pkrempa at redhat.com>
> src/conf/schemas/domaincommon.rng | 365 +++++++++++++++---------------
> 1 file changed, 186 insertions(+), 179 deletions(-)

Reviewed-by: Ján Tomko <jtomko at redhat.com>


More information about the libvir-list mailing list