Uma.Sabada@xxxxxxx wrote on 06/28/2006 10:24:52 PM:
> Michael,
>
>
> Registering an entity resolver does not solve the problem since the
> namespace of the schema differs from the namespace of the instance.
> I get the following error:
>
> Parse Error at line 14 column 20: TargetNamespace.1: Expecting namespace
'
> http://java.sun.com/xml/
> ns/javaee', but the target namespace of the schema document is '
> http://java.sun.com/xml/ns/j2ee'.
Therein lies the problem. The namespaces need to match. You can't get
around that. Either return a schema which matches the namespace in your
instance doc or change the namespace in your instance so that it matches
the target namespace of the schema you want to use.
> If I set setNamespaceAware(false), then it does not call the
entityresolver.
Don't set that to false. Schema validation requires namespace support.
> -Uma
>
>
> Michael Glavassevich wrote:
> Uma.Sabada@xxxxxxx wrote on 06/28/2006 03:41:38 PM:
>
>
> Hi,
>
> Is it possible to force validation against a specific local schema
> regardless of the namespace/schemalocation in the instance document?
>
>
> Yes. Register an EntityResolver which returns your local schema instead
of
> what was specified by the schemaLocation hint.
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@xxxxxxxxxx
> E-mail: mrglavas@xxxxxxxxxx
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|