Relax
NG
Just started to hack a prototype of a
Relax
NG validator in Python. I am aware that this is
duplication of work and that another Python implementation is on the way but I have
thought that working on my own implementation would help me
for the book I am starting to write on the subject and for
the work I am doing on the interoperability framework of DSLD. I see my implementation as
"self-didactical" and am not sure if it will eventually turn
into something which can be used by others, but I have
already learned quite a lot from it.
I am following James Clark's derivative
algorithm also described by A.M.
Kuchling who is working on the other Python implementation
and am also amazed by the elegance of the thing. The
variation which I am bringing over this is borrowed from my
Examplotron: having
learned that instance documents can be seen as schemas, I am
considering the instance document being validated as a set
of Relax NG patterns following a different serialization.
Using the same classes for the Relax NG patterns describing
the schema and the nodes from the instance document makes
these classes more generic and the validation become the
computation of the derivations of patterns relative to other
patterns which is kind of fun.