[Xcb] schema for xcb validation
Josh Triplett
josh at freedesktop.org
Fri Mar 2 19:11:04 PST 2007
Thomas Hunger wrote:
> the attachment contains a simple validator scheme written in relax ng
> compact syntax [1] for the xcb xml description language. It can be
> convertet to something xmllint understands by e.g. trang [2]:
Thanks for working on this!
> +grammar {
> + start = XCB
> +
> + XCB = element xcb {
> + attribute header {text},
> + attribute extension-xname {text}?,
> + attribute extension-name {text}?,
Any way to add a constraint that says these go together, such that you must
have both or neither?
> + IMPORT = element import {text}
We might want to constrain "text" in some way here, such as to an identifier.
> + STRUCT = element struct {
> + attribute name {text},
Ditto for this and other name attributes.
> + REQUEST = element request {
> + attribute name {text},
> + attribute opcode {xs:integer},
> + attribute combine-adjacent {xs:boolean}?,
> + (LIST | FIELD | PAD | EXPRFIELD)*,
> + REPLY?,
> + VALUEPARAM?
This doesn't look right; valueparam doesn't come after reply, it goes in the
set of alternatives.
> + FIELDREF = element fieldref { text }
Same constraint as for field names and types.
> + VALUE = element value { text }
> + BIT = element bit { text }
Shouldn't both of these use xs:integer?
> + OP = element op { attribute op {text}, EXPR, EXPR}
Can you give the explicit list of acceptable operators here, rather than just
"text"?
- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070302/6eed8a32/signature.pgp
More information about the Xcb
mailing list