j-users@xerces.apache.org
[Top] [All Lists]

RE: Xerces 1.4.4, XML, XSD and validation

Subject: RE: Xerces 1.4.4, XML, XSD and validation
From: "Scott Shaver"
Date: Thu, 20 Apr 2006 12:06:22 -0600
If I set the

domParser.setProperty("http://apache.org/xml/properties/schema/external-
schemaLocation",schemaURL);

schemaURL to "file:///c:/b2b80/riverbed_ship_request.xsd"

I get

warning:
http://www.w3.org/TR/xml-schema-1#SchemaLocation?file:///c:/b2b80/riverb
ed_ship_request.xsd Column: 1 Line: 1 PublicID: null
Error: cvc-elt.1: Cannot find the declaration of element
'shippingRequest'. Column: 201 Line: 2 PublicID: null

from the validator. This is very confusing why doesn't it just pick up
the schema from the schemLocation setting in the XML document? What is
the point of putting it in there if the parser won't download it? Why
does the 1.4.4 version find the file locally even when I don't specify a
local location for it? Why doesn't 2.8.0 find it at all? This really
shouldn't be that difficult to do.

> -----Original Message-----
> From: Michael Glavassevich [mailto:mrglavas@xxxxxxxxxx]
> Sent: Thursday, April 20, 2006 11:49 AM
> To: j-users@xxxxxxxxxxxxxxxxx
> Subject: RE: Xerces 1.4.4, XML, XSD and validation
>
> "Scott Shaver" <Scott.Shaver@xxxxxxxxxx> wrote on 04/20/2006
> 01:30:35 PM:
>
> > if I add
> >
> >
> domParser.setFeature("http://apache.org/xml/features/validatio
> n/dynamic"
> > ,true);
> >
> > it claims the validation worked even if I put garbage in the XML. :P
>
> If it can't find a schema, the parser won't report validation errors.
> That's what this feature does.
>
> 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
>
>

SPECIAL NOTICE

All information transmitted hereby is intended only for the use of the
addressee(s) named above and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
of confidential and privileged information is prohibited. If the reader
of this message is not the intended recipient(s) or the employee or agent
responsible for delivering the message to the intended recipient, you are
hereby notified that you must not read this transmission and that disclosure,
copying, printing, distribution or use of any of the information contained
in or attached to this transmission is STRICTLY PROHIBITED.

Anyone who receives confidential and privileged information in error should
notify us immediately by telephone and mail the original message to us at
the above address and destroy all copies.  To the extent any portion of this
communication contains public information, no such restrictions apply to that
information. (gate01)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>