XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Validating Bulk XML Data

We plan to validate these xml docs with xsds using java. The only problem is when we get say a 1000 such documents in a single file we want to be able to do it as quickly as possible. Broadly we can have two approaches either change the schema a bit so that the xsd grammar sees each of the files as one giant xml document with many nodes or parse each of the 1000. The disadvantage with the first approach seems to be if one of the original gomls is invalid the whole aggregated goml gets invalidated. The second approach is potentially slow (we are using this and multi threading it and tweaking bits of it).  I was wondering if any of these can be improved or is there a third approach.


-----Original Message-----
From: Michael Kay [mailto:mike@saxonica.com]
Sent: 15 August 2007 00:58
To: Ravindra Rao; xml-dev@lists.xml.org
Subject: RE: [xml-dev] Validating Bulk XML Data


> > 		    I ve got a number of xmls in one file and a 
> schema for these, is there a way to get around validating 
> them one at a time ?

It's unusual to have multiple XML documents in one file. Although there's
nothing in the specs to prevent it, I'm not aware of any XML parsers that
can handle this.

Perhaps you could explain more clearly what you mean?

There's a validation API in JAXP so if you are prepared to write an
application in Java you can achieve what you need: the API allows you to
prepare/compile a schema, construct a validator, and then use the validator
repeatedly to validate multiple source documents.

Michael Kay
http://www.saxonica.com/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS