← Prev in month
← Prev in thread
Relax-ng test suites & sample data?; Pre-pre-announce: relax-ng subtype checker
Hello to all,
First: This is my first post here so apologies in advance for any breaches of etiquette.
I was wondering if someone could point me at any repositories of schemas accompanied by valid & invalid instances, with emphasis on relax-ng validation and preferably leaving out extra complexities such as external (even xsd) datatype validation. The test suite put together by James Clark & linked from relaxng.org is a decent start, but focuses fairly heavily on parsing/normalization, and I'm targeting only the simplified syntax.
Additionally, I'd like to let anyone who is interested know that I'm in the process of building a (toy) relax-ng subtype checker: given two simple-syntax grammars a and b, it can check that all instances matched by a will also be matched by b (that is, a <= b). (Since it's trivial to construct a grammar that matches only a specific instance document, it can also perform validation ... hence, the first part of this message!)
Current status:
- regular hedge grammar subtype prover roughed-out and tested against toy examples; needs lots of refinement.
- simplified rng parser 70% or so. (It's parsing the grammars that I'm using in my job.)
- lots of longer range stuff in "idea" form (there's nothing preventing an implementation of subtype relations on xml schema part II, for example); however to be completely honest I probably won't have any more time for this project once it works well enough for my needs :)
The usefulness of such a thing, at least for me, is in constructing "toy languages" for producing/processing XML that can be proved to always work with valid instances. My working example, and the prime motivator of this whole ball of pasta, is a simple DB->XML mapping template language.
A few closing bits:
a) Has anyone done anything similar (not counting internal type-checking of XDuce & co.)? If it's more ready for prime-time, I'd be happy to drop this and use that!
b) This is unlikely, but if not (a) does anyone have a collection of test examples of grammars that should satisfy a subtype relation?
c) If anyone wants to contribute, either with test cases, code (Full disclosure: I'm using ocaml) or even doing a formal verification of the prover, they are very, very welcome to. If I ever release anything, it will be under a suitably hippy license.
Thanks to all for the time & tips.
-- Dan
First: This is my first post here so apologies in advance for any breaches of etiquette.
I was wondering if someone could point me at any repositories of schemas accompanied by valid & invalid instances, with emphasis on relax-ng validation and preferably leaving out extra complexities such as external (even xsd) datatype validation. The test suite put together by James Clark & linked from relaxng.org is a decent start, but focuses fairly heavily on parsing/normalization, and I'm targeting only the simplified syntax.
Additionally, I'd like to let anyone who is interested know that I'm in the process of building a (toy) relax-ng subtype checker: given two simple-syntax grammars a and b, it can check that all instances matched by a will also be matched by b (that is, a <= b). (Since it's trivial to construct a grammar that matches only a specific instance document, it can also perform validation ... hence, the first part of this message!)
Current status:
- regular hedge grammar subtype prover roughed-out and tested against toy examples; needs lots of refinement.
- simplified rng parser 70% or so. (It's parsing the grammars that I'm using in my job.)
- lots of longer range stuff in "idea" form (there's nothing preventing an implementation of subtype relations on xml schema part II, for example); however to be completely honest I probably won't have any more time for this project once it works well enough for my needs :)
The usefulness of such a thing, at least for me, is in constructing "toy languages" for producing/processing XML that can be proved to always work with valid instances. My working example, and the prime motivator of this whole ball of pasta, is a simple DB->XML mapping template language.
A few closing bits:
a) Has anyone done anything similar (not counting internal type-checking of XDuce & co.)? If it's more ready for prime-time, I'd be happy to drop this and use that!
b) This is unlikely, but if not (a) does anyone have a collection of test examples of grammars that should satisfy a subtype relation?
c) If anyone wants to contribute, either with test cases, code (Full disclosure: I'm using ocaml) or even doing a formal verification of the prover, they are very, very welcome to. If I ever release anything, it will be under a suitably hippy license.
Thanks to all for the time & tips.
-- Dan
← Prev in month
← Prev in thread