[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]