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

Re: Validating HAL device info files



> I put together a RELAX NG schema, you should find it attached.
> 

Thanks, committed and will be installed on 'make install' just like the
DTD.

> It's "tighter" than the DTD since it allows only one of string, int, or
> bool as attributes inside a <match> element, and tries to constrain
> their values according to type, plus it constrains the content of a
> <merge> based upon its type attribute.
> 
> It currently doesn't constrain the value of a <match> element's int
> attribute.  The parser in hald/device_info.c seems to use strtol so the
> value can be expressed in hex, octal or decimal - the only current
> example uses hex. I believe the rng file could express this using
> pattern facets (I'm learning RELAX NG as I go along, hope it doesn't
> show)

This would be great - I have to admit that I still need to learn RELAX
NG myself sometime!

Cheers,
David 



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