Hi,

I am using <xs:any
> namespace="##any" processContents="strict"/> and I am validating xml instance 
> which is having elements which belong to the different namespace and 
> corresponding to this namespace, schema is not pre-loaded. I mean yhat 
> external schema is not pre-loaded.

How do I tell Java Validator about this external schema so that xml instance is 
validated successfully ?


Is there any way I can tell the validator at the time of validation only about 
external schema which is not pre-loaded with main schema?

Help me in understanding whether it can be done ???
Thanks
Ajay 

--- On Thu, 11/19/09, ajay bhadauria <abhadau...@yahoo.com> wrote:

> From: ajay bhadauria <abhadau...@yahoo.com>
> Subject: xs:any namespace resolution
> To: j-users@xerces.apache.org
> Date: Thursday, November 19, 2009, 12:48 AM
> Hi,
> 
> I have schema file 1.xsd which has xs:any schema construct
>  
> <xs:complexType name="ExtensionEnvelope">
>         <xs:sequence>
>             <xs:any
> namespace="##any" processContents="strict"/>
>         </xs:sequence>
>     </xs:complexType>
> 
> And I try to validate xml instance ( test2.xml ) against
> this schema, it gave the following error
>      cvc-complex-type.2.4.c: The
> matching wildcard is strict, but no declaration can be found
> for element 'ns1:Document'.
> 
> However, the namespace which the Validator is looking for
> is in other xsd file (2.xsd). 
> 
> How do I tell Validator the location of 2.xsd file during
> validation ? 
> 
> The test.xml has some elements which belong to the
> namespace urn:swift:xsd:$xtsn.998.001.01 which is defined in
> the 2.xsd file.
> 
> 
>       
> ---------------------------------------------------------------------
> 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