Patch for FDI schema

David Malcolm dmalcolm at redhat.com
Tue Nov 9 13:55:48 PST 2004


On Mon, 2004-11-08 at 17:58 -0500, David Zeuthen wrote:
> On Fri, 2004-11-05 at 18:25 -0500, Dave Malcolm wrote:
> > Attached is a patch to the DTD and RELAX NG schema for FDI files, which
> > makes all of the current FDI files in CVS validate.
> > 
> 
> Hey, thanks for doing this,
> 
> > FWIW the storage-policy.fdi file seemed to be the one that required the
> > most extension to the existing schema.
> > 
> > I refactored the content model of <merge> out so that it's now shared by
> > both <merge> and <append> elements (in the rng file, at least) - they
> > have identical content models; in particular, both can have a
> > "copy_property" type of key.  Is all of this sane?
> > 

> Yeah, two small things I caught - should be easy to fix (but I don't
> grok XML as good as you do!)

Revised patch attached...

> 
> > +    compare_lt        CDATA #IMPLIED
> 
> Should probably also list compare_le, compare_gt and compare_ge.

Added

> 
> 
> > +                               <attribute name="compare_lt">
> > +                                       <data type="long"/>
> > +                               </attribute>
> 
> Actually, compare_* applies to all four data types:
> 
>  int
>  string
>  double
>  uint64
>  bool
> 
> with the usual semantics (e.g. lexicographical ordering on strings;
> false is before true etc.); there is no long data type.

Added all of them, changed the schema to merely expect <text/> i.e. any
textual data here since I don't think you can get at the type of the key
being compared.

Also added a comment to explain why I'm using a string rather than an
int for the match int="0xdeadbeef" type.

> 
> > It'd be nice if someone could run the RELAX NG schema through some kind
> > of documentation-generator for going into the HAL spec.

Am having a go at doing this; I'll send the results if I get it
working...

> > 
> > Also attached are a couple of crappy shell scripts I've been using for
> > checking validation - though perhaps this sort of checking should be
> > integrated into the build framework? (on "make distcheck", perhaps?)
> > 
> 
> That would be awesome; I will do this for the updated patch.
> 
> Thanks,
> Dave
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-schema2.patch
Type: text/x-patch
Size: 4222 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20041109/ad146564/hal-schema2.bin
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list