472,352 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

tool to validate xml file against custom XML Schema file

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....
Jul 20 '05 #1
9 12379
In article <XL********************@rogers.com>,
Leona <le*****@rogers.com> wrote:

% 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

--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #2
> 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
Jul 20 '05 #3
> 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

Jul 20 '05 #4
saqib ali wrote:
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.
Jul 20 '05 #5
On Thu, 28 Oct 2004 09:57:20 +0200
Jürgen Kahrs <Ju*********************@vr-web.de> wrote:
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.


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,
--
Steffen Beyer <sb****@reactor.de>

GnuPG key fingerprint: CA00 1611 242B 89D4 E643 E235 05F3 7689 DD3E EB26
Public key available upon request or at http://wwwkeys.de.pgp.net
Jul 20 '05 #6
ru********@gmail.com wrote:
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.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #7
Steffen Beyer wrote:
--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 !
Jul 20 '05 #8
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.

Jul 20 '05 #9
"Leona" <le*****@rogers.com> writes:
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: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jan Eliasen | last post by:
Hi I am searching for a tool that will allow me to validate an xml-document against a schema. I have found several, and I have even made my own...
0
by: Aaron P Frenger | last post by:
Hello All, I have a very large XML file that I would like to split up into a few smaller files, but still use only one schema. I am using Xerces...
1
by: QuantDev | last post by:
Hi NG, I would need to validate an XML fragment against a type defined within an XSD (which defines many other things). What is the correct way...
1
by: Ron Rohrssen | last post by:
I've been working on learning XML schemas and trying to make use of the MS classes for validating data against a schema. So, I've been trying to...
1
by: aevans1108 | last post by:
Greetings All If this is the wrong place to post this question, please give me a push in the right direction. Thanks. I know there has to be...
6
by: LesleyW | last post by:
Hi Apologies if this is a really dumb question, but being new to XML and Schemas, I wonder if giving the namespace for eg xsd or xsi as a website...
7
by: Ali-R | last post by:
Hi all, I am getting a CSV file like this from our client: "C1","2","12344","Mr","John","Chan","05/07/1976"......... I need to validate **each...
6
by: Jonny | last post by:
Hi, I'm trying to validate my xml against a xsd but I can't get it to work. Originally, I wanted to validate an xml string but since I didn't get...
1
Gulzor
by: Gulzor | last post by:
Hi, I have defined a set of custom tags that I put among regular HTML tags. E.g. <body> <div id="regular_id"> <namespace:container...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.