You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Richard Emberson <re...@outerharbor.com> on 2002/09/13 02:28:17 UTC

namespace to schema file

During xml validation, how to I map from namespace (the namespace
attribute of the
element) to schema definition file. Using XMLEntityResolver one is only
handed  the entity to be resolved, not the namespace that it is
associated with (if
a client xml document in the schemaLocation attribute puts in the
"wrong" entity
associated with a namespace, there is no way to map it to the correct
local
version of the schema file).

Also, since schemaLocation attributes are only hints to the validator,
how can one
register with the xerces DOMParser an association between the namespace
of the
document and the location of the schema document?

Thanks

Richard


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


RE: namespace to schema file

Posted by Aleksandar Milanovic <am...@galdosinc.com>.
You can try using the external schema location property of Xerces. If a
namespace is not specified using this property, Xerces should fall back onto
the specified schema location in the document.

Alex

-----Original Message-----
From: emberson@olympia.outerharbor.com
[mailto:emberson@olympia.outerharbor.com]On Behalf Of Richard Emberson
Sent: September 12, 2002 5:28 PM
To: xerces-j-user@xml.apache.org
Subject: namespace to schema file


During xml validation, how to I map from namespace (the namespace
attribute of the
element) to schema definition file. Using XMLEntityResolver one is only
handed  the entity to be resolved, not the namespace that it is
associated with (if
a client xml document in the schemaLocation attribute puts in the
"wrong" entity
associated with a namespace, there is no way to map it to the correct
local
version of the schema file).

Also, since schemaLocation attributes are only hints to the validator,
how can one
register with the xerces DOMParser an association between the namespace
of the
document and the location of the schema document?

Thanks

Richard


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




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


Re: namespace to schema file

Posted by Joseph Kesselman <ke...@us.ibm.com>.
In general, there is no promise that the Namespace URI has anything to do 
with where the Schema is actually loaded from. The W3C's "Semantic Web" 
working group is supposedly going to address the question of what 
relationship, if any, exists between these two currently-independent 
concepts.

In specific: I'm not sure whether Xerces has a good way to plug in a 
custom mapping from namespace to schema. Note that if you do this it's not 
guaranteed to work for anyone else's document.

The schemalocattion "hints" are actually the most official solution 
currently avalable. Yes, this is a nuisance.

______________________________________
Joe Kesselman  / IBM Research

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