[Libguestfs] [PATCH 1/2] inspector: Add RELAX NG schema for virt-inspector --xml output.

Jim Meyering jim at meyering.net
Fri Oct 2 13:11:09 UTC 2009


Richard W.M. Jones wrote:
> Subject: [PATCH 1/2] inspector: Add RELAX NG schema for virt-inspector --xml output.
>
> diff --git a/inspector/virt-inspector b/inspector/virt-inspector
...
> +There is a RELAX-NG schema for this XML in the file
> +I<virt-inspector.rng> which normally ships with virt-inspector, or can
> +be found in the source.

> diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng
> new file mode 100644
> index 0000000..1da58fc
> --- /dev/null
> +++ b/inspector/virt-inspector.rng
> @@ -0,0 +1,168 @@
> +<grammar xmlns="http://relaxng.org/ns/structure/1.0">
> +  <!-- -*- xml -*-
> +  This is a RELAX NG schema for the output of 'virt-inspector - -xml'.
> +
> +  To validate an existing document against this schema, you can
> +  use xmllint, like this:
> +
> +    virt-inspector - -xml Foo > output.xml
> +    xmllint - -noout - -relaxng virt-inspector.rng output.xml
> +
> +  (Note that because of limitations of XML, I have had to put spaces
> +  between double dashes in the above code.  Those spaces should not
> +  be there in what you type on the command line).

This looks fine (in spite of having to write "- -" for "--" above ;-), so
ACK.




More information about the Libguestfs mailing list