tool to validate xml file against custom XML Schema file

L

Leona

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....
 
P

Patrick TJ McPhee

% 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
 
R

rumionfire

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
 
S

saqib ali

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
 
?

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

saqib said:
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.

xmllint can validate against a DTD.
 
S

Steffen Beyer

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,
 
J

Johannes Koch

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.
 
?

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

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 !
 
R

rumionfire

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.
 
H

Henry S. Thompson

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
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 

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
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top