commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Herscu <bmf1...@axentra.net>
Subject Re: XML Validation Tag Library
Date Tue, 17 May 2005 14:28:24 GMT
Hi Lauren,

Here is what I have so far:

<core:new
	className="${verifier.factory.classname}"
	var="verifierFactory" />

<validate:verifier
	var="verifier"
	factory="${verifierFactory}"
	uri="${schema.uri}" />

<validate:validate
	var="validationResult"
	verifier="${verifier}">
	<core:include uri="${source.uri}" />
</validate:validate>

NOTE: verifier.factory.classname must be set to JARV compatible 
factory (XercesJARV - org.kohsuke.jarv.xerces.verifierFactory; 
MSV - com.sun.msv.verifier.jarv.TheFactoryImpl). Also you will 
have to put the JARV driver (MSV, XercesJARV, or other)  and its 
dependencies into the $MAVEN_HOME/libs directory. MSV can work 
both with RelaxNG and with XML Schema - it is able to decide 
according to the schema type pointed by ${source.uri}.

Currently, I have a problem with namespace collisions. So, be 
sure to use a different a namespace for your XML files.

Adrian.

P.S. If you need in-memory processing look for the file-related 
tags - those will allow you to manipulate Jave File objects 
in-memory.


Lauren Bish wrote:

> I would be interested also.
> 
> I have a case where I need to generate an XSD on the fly (not to a file, 
> to an in memory definition), then use it and some logic to validate a 
> given XML blob (also in memory).
> 
> I was thinking of just using Xerces, but would be interested in 
> alternatives and their benefits.
> 
> Adrian Herscu wrote:
> 
>> Hi all,
>>
>> Where can I find an example for using the XML Validation Tag Library?
>>
>> Thanks for your time,
>> Adrian.
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message