command line validator

J

jsnX

I'm trying to find a command line schema validator that works for Relax
NG schemas. Unfortunately, the two most promising ones that I could
find - jing and msv - don't actually work on my system (fedora core 5,
amd 64) with either java 1.4.2 or java 1.5

The errors look like the kind of things my distributions maintainers
need to sort out - and I'd really rather use something written in C,
anyhow. Is there such a thing? Libxml2 offers the functionality, but I
haven't seen any command-line validators based on it. Is Relax NG dead?
There's little activity on the mailing list, and it's only mentioned
like once a year on this group.
 
J

jsnX

I tried installing msv and jing on my gentoo box, and there were
40-some dependencies for each of them! The thing tried to install Xorg,
even though I have optional X support disabled.

Really, there has to be something better - is there no lightweight
Relax NG validator?
 
J

Joe Kesselman

Just to get the stupid question out of the way: I presume you've
checked the list of implementations at http://relaxng.org/#software

I haven't used RelaxNG, but given your requirements and the information
posted there, my own inclination would be to check the lib2xml code
examples to see if one of 'em is usable as it stands, or is easily
adaptable. I'd bet there's something there which comes close.
http://www.xmlsoft.org/examples/index.html

I can't speak to the question of RelaxNG's status; I haven't had reason
to investigate.
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

jsnX said:
I'm trying to find a command line schema validator that works for Relax
NG schemas. Unfortunately, the two most promising ones that I could

Use DTD. Any user bold enough to ignore established
standards should be prepared to be left on its own
at any time.
 
J

jsnX

Use DTD.

Thanks for the advice, but that's not what I was asking about. DTD is
not able to impose all the requirements I care about, whereas Relax NG
is. I'd rather not make my validator a mish-mash of perl scripts and
DTD.
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

jsnX said:
Thanks for the advice, but that's not what I was asking about. DTD is
not able to impose all the requirements I care about, whereas Relax NG
is. I'd rather not make my validator a mish-mash of perl scripts and
DTD.

OK, so the requirements and constraints are clear now.
But you should be aware of the implications of your choice.
If you decide to rely on a non-standard, then work may
become much more difficult.
 
J

jsnX

...you should be aware of the implications of your choice.
...work may become much more difficult.

Indeed, but working with an inadequate schema language is not easy.

This is rather like deciding to use Ruby for web appliactions - it's
hard to find people who know it and it takes a little while to get it
fully working on your box, but once all that is done coding proceeds at
a faster clip and the code produced is better.

It may be the case that working with a less popular standard leads to
more work in the beginning - but if it's the standard that fits your
domain, than there's apt to be a lot less work in the maintenance
phase, when impedance mismatch is the principal cost. Work with less
widely used standards is more *front-loaded*, not necessarily more
costly overall. If it was, the business world would just stick with
inadequate standards forever.

I take issue with the suggestion that Relax NG is as a non-standard -
it certainly has OASIS behind it. It may not be widely used, but
that's not the same thing as, say, YAML.
 
C

C. M. Sperberg-McQueen

jsnX said:
I'm trying to find a command line schema validator that works for Relax
NG schemas. Unfortunately, the two most promising ones that I could
find - jing and msv - don't actually work on my system (fedora core 5,
amd 64) with either java 1.4.2 or java 1.5
The errors look like the kind of things my distributions maintainers
need to sort out - and I'd really rather use something written in C,
anyhow. Is there such a thing? Libxml2 offers the functionality, but I
haven't seen any command-line validators based on it.

Look at xmllint, which can be viewed as 'a way
to invoke libxml from the command line'.

--C. M. Sperberg-McQueen
World Wide Web Consortium
 
J

jsnX

Thanks, that's exactly what I was looking for!

C. M. Sperberg-McQueen said:
Look at xmllint, which can be viewed as 'a way
to invoke libxml from the command line'.

--C. M. Sperberg-McQueen
World Wide Web Consortium
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,005
Messages
2,570,264
Members
46,859
Latest member
HeidiAtkin

Latest Threads

Top