You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/11/28 21:24:15 UTC
DO NOT REPLY [Bug 14876] -
Validation: Why can't the schemaLocation be pulled from the xml document?
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14876>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14876
Validation: Why can't the schemaLocation be pulled from the xml document?
sandygao@ca.ibm.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From sandygao@ca.ibm.com 2002-11-28 20:24 -------
You don't *have to* set schemaSource. When a namespace is referenced in the
instance document, the parser first looks for a schema in the schemaSource
property. If nothing is found there, it then looks for it in xsi:schemaLocation
attribute(s). So you don't have to dig up the xsi:schemaLocation attribute(s)
and convert them to the schemaSource propety.
I tried the following:
parser.setAttribute("schemaSource", "xsd2");
<ns1:root xmlns:xsi="..." xmlns:ns1="ns1" xsi:schemaLocation="ns1 xsd1"> ...
Xerces found xsd1 and used it to validate the instance.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org