RE: [xsl] mass validation of xml files

Subject: RE: [xsl] mass validation of xml files
From: omprakash.v@xxxxxxxxxxxxx
Date: Fri, 30 Jun 2006 08:53:35 +0530
Hi,
       I may be wrong here but isn't this the kind of thing that the schema
validation API was invented for. That is, of course , assuming that all the
xml documents refer to the same schema, which seems a reasonable assumption
to make.  But then this would no longer be on topic, would it?

For more details, refer to the SchemaValidator.java file under
samples\validation directory of your JAXP installation and the following
link:

http://xerces.apache.org/xerces2-j/faq-grammars.html#faq-1

Regards,
V.Omprakash






                                                                                                                                       
                      "Michael Kay"                                                                                                    
                      <mike@xxxxxxxxxx         To:      <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>                                              
                      om>                      cc:      (bcc: omprakash.v/Polaris)                                                     
                                               Subject: RE: [xsl] mass validation of xml files                                         
                      06/30/2006 04:29                                                                                                 
                      AM                                                                                                               
                      Please respond                                                                                                   
                      to xsl-list                                                                                                      
                                                                                                                                       
                                                                                                                                       




>   I guess it would be possible with a schema processor like
> Saxon to load once the schema and loop over the 30,000 files
> with a little custom application.

Yes indeed. Something like this:

<xsl:import-schema namespace="abc" schema-location="abc.xsd"/>

<xsl:template name="start">
  <out>Validated <xsl:value-of
select="count(collection('source-dir?validate=strict;on-error=warning'))"/>
documents</out>
</xsl:template>

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



This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in

Current Thread