473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 12436
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 in VB.NET but all the utilities I have found can...
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 C++ libraries. My idea is to have one schema...
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 of achieving this? QD2004
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 work through some simple schemas and instances....
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 a simpler way to do this, but this is as simple a...
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 address means that the user has to be online...
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 filed value** against a set of rules ,for...
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 that to work I tried to validate an xml file...
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 id="something" type="article" /> </div> </body>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.