xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucian Holland <l...@decisionsoft.com>
Subject Validation/processing of xsi:schemaLocation
Date Wed, 22 Sep 2004 15:16:56 GMT
Hi,

Having perused the relevant sections of the schema spec I'm not really 
sure how precisely this is specified, but I'm wondering if Xerces is 
handling xsi:schemaLocation quite as it should.

The most obvious thing is that Xerces doesn't actually validate the 
values of the xsi:schemaLocation attribute according to its data type. 
On closer examination, however, Structures section 3.4.4 clause 3 seems 
to imply that xsi attributes never get validated, which seems a bit odd 
to say the least. I don't know whether I've got this wrong, since it 
would strike me as sensible for these to be validated...

On the other hand, the schema spec *does* seem to imply that when an 
xsi:schemaLocation attributes is used, the "actual value" is what 
provides the hint; i.e. invalid characters and the like should be 
escaped according to the rules for the anyURI type. Xerces doesn't 
appear to do this - it just takes the value of the attribute as it 
appears in the document.

I noticed this whilst using an entity resolver: when xerces is looking 
for a schema, the entity resolver gets called with the hint for the 
relevant namespace as the supplied systemId. This hint is the 
unprocessed string resulting from tokenizing the attribute, not the 
"actual value". If the hint is not a valid URI as it appears in the 
document, but does satisfy anyURI and consequently has an actual value 
that *is* a valid URI, I would have thought that Xerces should use this 
instead...

I haven't reported this as a bug because I'm very unsure about all of 
this. It does seem strange, however, particularly as it is at odds with 
the behaviour of schemaLocation attributes on imports etc...

Lucian

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message