473,903 Members | 4,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 12479
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.c om
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********@gmai l.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
2186
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 not do what I am looking for. I need a utility that will validate a totally unqualified document against an .xsd that imports three other .xsds
0
1596
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 specified in the main file. At some point in the schema I would add a choice element that would either have a tag that specifies an external file or a tree of tags. Once the main xml file is loaded I would search for any instances where the
1
1759
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
1452
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. But, the parser inside of Visual Studio seems to frequently validate against a cached version of the schema. Occassionally I have an XML file that won't validate
1
9112
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 way as I could come up with. Yes, it's obvious I don't know what I'm doing. I'm creating an XSD string and an XML string at runtime (ie: NOT read
6
4443
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 when they run the app? If so, what should I do if I can't guarantee that they will be? Can I bring all these files into the app? Is that desirable? I'm about to write an app that takes an XML file as input, using Visual Studio 2005 Express and SQL...
7
16297
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 instance for "05/07/1976" ,I need to make sure that it's in the right format ,It's not later than today and lots of other rules ,Is there somebody who can help me how to that?Can I map it to some sort of xml schema or something?
6
2760
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 instead. Didn't work either. Actuallty, the xml gets loaded but there are no events raised that says my xml is incorrect! I'm using .NET 2.0 and my code is listed below. ALL help is appreciated! Thanks!
1
4451
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
10003
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9851
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6099
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4312
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3327
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.