Hi Michael,

My indication of the JDK was misleading as I am using the Apache release
but only version 2.6.2.
A test using 2.9.1 reveals that the "honour-all-schemaLocations" feature is
available for the XMLGrammarLoader in that release (but wasn't available in
2.6.2).
And it results in a call to the XMLErrorHandler warning() method, which is
great.
The JAXP newSchema() instantiation doesn't pick it up in either version,
perhaps because its a warning and not an error (?)
Thanks for your help.

Regards,
Nick.



                                                                           
             Michael                                                       
             Glavassevich                                                  
             <mrgla...@ca.ibm.                                          To 
             com>                           j-users@xerces.apache.org      
                                                                        cc 
             28/05/2009 03:10                                              
             PM                                                    Subject 
                                            Re: Applying                   
                                            honour-all-schemaLocations     
             Please respond to              semantics to XMLGrammarLoader  
             j-us...@xerces.ap              [SEC=UNCLASSIFIED]             
                 ache.org                                  Protective Mark 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



Hi Nick,

If you're relying on something in Java 6 then you're not using Xerces. Sun
forked the codebase they ship in the JDK long ago, made all sorts of
private changes and apparently aren't keeping in synch with activity here.
I couldn't tell you what it's doing. I'd suggest that you download a recent
Apache release (i.e. Xerces-J 2.9.1) and try that.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

nicholas.ard...@immi.gov.au wrote on 05/28/2009 12:52:34 AM:

> Hi Michael,
>
> Unfortunately the "honour-all-schemaLocations" feature is not supported
on
> the XMLGrammarLoader (JDK 1.6).
> It throws an XMLConfigurationException and is not listed in results of
> getRecognizedFeatures().
> I did also try the JAXP Validation API but the call to newSchema()
doesn't
> pick up the error in this case.
> Should it ?
>
> Thanks,
> Nick
>
>
>
>
>

>              Michael

>              Glavassevich

>              <mrgla...@ca.ibm.
To
>              com>                           j-...@xerces.apache.org

>
cc
>              28/05/2009 02:38               j-users@xerces.apache.org

>              PM
Subject
>                                             Re: Applying

>                                             honour-all-schemaLocations

>              Please respond to              semantics to XMLGrammarLoader

>              j-us...@xerces.ap                             Protective
Mark
>                  ache.org

>

>

>

>

>

>

>
>
>
> Hi Nick,
>
> While I'm not sure about the challenge you're having with setting
features
> on an XMLGrammarLoader (as it does have a setFeature() method) I'd
> recommend that you use the JAXP Validation API [1]. In particular take a
> look at SchemaFactory. A call to newSchema() will check all of the
> constraints on the schema documents being processed.
>
> Thanks.
>
> [1]
> http://xerces.apache.org/xerces2-
> j/javadocs/api/javax/xml/validation/package-summary.html
>
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrgla...@ca.ibm.com
> E-mail: mrgla...@apache.org
>
> Nick Ardlie <nicholas.ard...@immi.gov.au> wrote on 05/28/2009 12:24:13
AM:
>
> >
> > Is there a way to set the
> > "http://apache.org/xml/features/honour-all-schemaLocations"; feature on
> the
> > underlying parser used by an XMLGrammarLoader (or another way to
achieve
> an
> > equivalent outcome)?
> >
> > I'm using the XMLGrammarLoader for programmatic validation of XML
schemas
> > but its failing to pick up cases where multiple import statements are
> > included and a later import statement has an incorrect path (but a
former
> > import has already bound components to that namespace via a nested
import
> -
> > with a correct path).
> >
> > Or is there a better way to programmatically validate schemas (in the
> > absence of an instance document) in Xerces-J (and still assert the
> > honour-all-schemaLocations feature behaviour)?
> >
> > Regards,
> > Nick.
> > --
> > View this message in context: http://www.nabble.com/Applying-honour-
> >
>
all-schemaLocations-semantics-to-XMLGrammarLoader-tp23755010p23755010.html
> > Sent from the Xerces - J - Dev mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org
> > For additional commands, e-mail: j-dev-h...@xerces.apache.org
>
>
>
> --------------------------------------------------------------------
> Important Notice: If you have received this email by mistake, please
advise
> the sender and delete the message and attachments immediately.  This
email,
> including attachments, may contain confidential, sensitive, legally
privileged
> and/or copyright information.  Any review, retransmission, dissemination
> or other use of this information by persons or entities other than the
> intended recipient is prohibited.  DIAC respects your privacy and has
> obligations under the Privacy Act 1988.  The official departmental
privacy
> policy can be viewed on the department's website at www.immi.gov.au.
See:
> http://www.immi.gov.au/functional/privacy.htm
>
>
> ---------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to