Through my employer I am involded in a rather major standardisation effort in the Netherlands were we try to interconnect governmental databases through XML/ReST based webservices (I've designed the architecture and protocol). Yesterday I got permission from the Project Board to use Ruby or Python as the prototyping language for use in the implementation toolkit which will be distributed among implementors. Well. that's the good news. The "bad" news is that a functional requirement of any participating system is, that it can automaticaly validate the XML messages against a provided schema. Unfortunately, REXML, nice as it is, doesn't support XML validation in this manner.
Can anyone point me to a (schema based) validating XML parser which can be used from Ruby? I've seen a reference to a Ruby binding for expat. But that one dates from 2002.
It may not be exactly what you want, but you can use xmllint from Ruby using
system or ` .
Best,
Zev
···
On Fri, 25 Feb 2005 17:25:00 +0900, Iwan van der Kleyn <none@none.net> wrote:
Can anyone point me to a (schema based) validating XML parser which can be used from Ruby? I've seen a reference to a Ruby binding for expat. But that one dates from 2002.
Through my employer I am involded in a rather major standardisation
effort in the Netherlands were we try to interconnect governmental
databases through XML/ReST based webservices (I've designed the
architecture and protocol). Yesterday I got permission from the Project
Board to use Ruby or Python as the prototyping language for use in the
implementation toolkit which will be distributed among implementors.
Well. that's the good news. The "bad" news is that a functional
requirement of any participating system is, that it can automaticaly
validate the XML messages against a provided schema. Unfortunately,
REXML, nice as it is, doesn't support XML validation in this manner.
Can anyone point me to a (schema based) validating XML parser which can
be used from Ruby? I've seen a reference to a Ruby binding for expat.
But that one dates from 2002.
XMLParser[1] wraps expat, don't know about validation (REXML is generally
good enough for me).
I would, however, suggest considering just calling expat (or whatever)
to do validation if that's necessary and there are no alternatives.
On the other hand, you could use REXML to parse the schema and build
the validator yourself
Can anyone point me to a (schema based) validating XML parser which can be used from Ruby? I've seen a reference to a Ruby binding for expat. But that one dates from 2002.
Through my employer I am involded in a rather major standardisation effort in the Netherlands were we try to interconnect governmental databases through XML/ReST based webservices (I've designed the architecture and protocol). Yesterday I got permission from the Project Board to use Ruby or Python as the prototyping language for use in the implementation toolkit which will be distributed among implementors. Well. that's the good news. The "bad" news is that a functional requirement of any participating system is, that it can automaticaly validate the XML messages against a provided schema. Unfortunately, REXML, nice as it is, doesn't support XML validation in this manner.
Can anyone point me to a (schema based) validating XML parser which can be used from Ruby? I've seen a reference to a Ruby binding for expat. But that one dates from 2002.
Regards,
Iwan
I have basic wrappers for schema and dtd validation in my version of libxml-ruby.