tool to validate xml file against custom XML Schema file

Leona

Usenet Archive
Joined
Oct 27, 2004
Messages
1
Reaction score
0
Hello all,

does anyone know of a tool, preferably free, preferably on linux, which will take an xml file and validate it against your own custom W3C XML Schema file (.xsd) ??

All help appreciated - it's proving very difficult to find. Failing that, does anyone know how to get the W3C's own online validating engine (XSV, I think it's called) to do the same job? I can't get it to do what I want and I can't really understand the output.

Many thanks in advance....
 

Patrick TJ McPhee

Usenet Archive
Joined
Apr 2, 2000
Messages
269
Reaction score
0
% does anyone know of a tool, preferably free, preferably on linux, which will % take an xml file and validate it against your own custom W3C XML Schema file % (.xsd) ??

How about xmllint from libxml?

% All help appreciated - it's proving very difficult to find.

Depending on what you have on your system, look in /usr/local/bin. Failing that, try http://xmlsoft.org
 

rumionfire

Usenet Archive
Joined
Oct 20, 2004
Messages
16
Reaction score
0
does anyone know of a tool, preferably free, preferably on linux, which will
take an xml file and validate it against your own custom W3C XML Schema file

You can use openjade from cmd line to do this. openjade (http://openjade.sf.net) comes with most major linux distros. type in onsgmls on the cmd line to get more info.
Failing that, does anyone know how to get the W3C's own online validating engine (XSV, I think it's called) to do the same job? I can't get it to do

W3C's online validator is merely a web interface to openjade. It passed the input file to openjade, and takes the output and displays it as a webpage. i use the same technique for the docbook validator @ http://validate.sf.net

In Peace,
Saqib Ali
http://validate.sf.net
 

Saqib Ali

Usenet Archive
Joined
Oct 9, 2002
Messages
74
Reaction score
0
How about xmllint from libxml?

as far as i know, xmllint only checks if the document is well-formed or not. It does NOT check for the validity of the document against a schema. Please correct if I am wrong. Thanks. Saqib Ali http://validate.sf.net
 

Steffen Beyer

Usenet Archive
Joined
Apr 17, 2001
Messages
7
Reaction score
0
xmllint can validate against a DTD.

That's right, but

--relaxng schema
Use RelaxNG file named schema for validation.

--schema schema
Use a W3C XML Schema file named schema for validation.

are supported, too.

$ xmllint --version
xmllint: using libxml version 20611
compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer XInclude Iconv Unicode Regexps Automata Schemas

Regards,
 

Johannes Koch

Usenet Archive
Joined
Nov 14, 2000
Messages
801
Reaction score
0
does anyone know of a tool, preferably free, preferably on linux, which will take an xml file and validate it against your own custom W3C XML Schema file
[...]
W3C's online validator is merely a web interface to openjade. It passed the input file to openjade, and takes the output and displays it as a webpage. i use the same technique for the docbook validator @ http://validate.sf.net

But opensp does not support W3C schema.
 
Joined
Oct 27, 2004
Messages
9
Reaction score
0
Steffen said:
--relaxng schema
Use RelaxNG file named schema for validation.

--schema schema
Use a W3C XML Schema file named schema for validation.

are supported, too.

Thanks for the hint.
$ xmllint --version
xmllint: using libxml version 20611
compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer XInclude Iconv Unicode Regexps Automata Schemas

Most of my daily work is on RedHat 7.2 and there
we have an xmllint which can only validate against
a DTD. But the xmllint that comes with RedHat 9.0
behaves as describes by you. I will use it !
 

rumionfire

Usenet Archive
Joined
Oct 20, 2004
Messages
16
Reaction score
0
But opensp does not support W3C schema.

that is correct. sorry. i should have read the original post more carefully. it must have been very late in the night :)

sorry.
 

Henry S. Thompson

Usenet Archive
Joined
Jan 14, 2000
Messages
309
Reaction score
0
Leona said:
Failing that, does anyone know how to get the W3C's own online validating engine (XSV, I think it's called) to do the same job? I can't get it to do what I want and I can't really understand the output.

Two alternative answers:

1) If your W3C XML Schema document is available on the web, you can give the XSV web form both the instance URI and the schema document URI and it will validate for you

2) If not, you can download and install an rpm and run it from the command line

Detailed instructions for both approaches are at [1].

ht

[1] http://www.ltg.ed.ac.uk/~ht/xsv-status.html
 

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

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top