On Wed, Aug 02, 2006 at 09:21:09AM +0100, Ewan Mellor wrote:
> On Tue, Aug 01, 2006 at 03:21:06PM -0400, Andrew D. Ball wrote:
>
> > Please pardon my ignorance if this had already been discussed.
> >
> > Has there been any work on standardizing schemas for Xen virtual machine
> > configurations? I really like XSDL schemas instead of DTD's.
> > Regardless, I'd like to have schemas that
> >
> > (1) Indicate which version of Xen they require.
> > (2) Enumerate exactly which options are available.
>
> As far as I know, there's no-one working on XSDL schemas for this, no. I did
> intend to put together a DTD, though I've not done it yet. I've no idea
> whether XSDL schemas or other technologies would be appropriate, though
> Daniel's reply suggests that there's doubt, at least ;-)
Well I was mostly reacting to "I really like XSDL schemas" :-)
It definitely allows a better checking of the input documents, but
trying to make one XSD handle evolution and versioning is in practice
relatively hard.
> Perhaps you could kick this off, if you are interested?
I have an item about this in libvirt TODO. In my experience it may
less be useful for validating input at this point (since the format is likely
to evolve) than as a way to document relatively thorougthly what one may
find in the XML instance (and hence write the appropriate code handling all
cases). Sometimes the mapping between the predefined schemas data types
and what is the actually acceptable values is where the real usefulness
of the check, examples:
- with DTD you can say a domain has one memory and one name children
- with XSD you may refine this stating that the content of memory is
a positive integer and the content of name is a string
- a better schemas would also check values to make sure memory is at least
4Mbytes and less than 16GB and that the name matches [0-9a-zA-Z]* to
avoid problems
Now the amount of effort you take to build a really good schemas is worth it
only if the instances content is relatively stable, and if many people use it
as it's harder to define than with a normal programming language.
My 2 euro cents,
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
|