[EMAIL PROTECTED] wrote:
> does NOT have the xsi:location attribute...What I want to do is decide at
> RUN time which Schema to validate this "document" against....load the
> schema, load the document and call some method to say "validate this
> document against this schema"....Does such a thing exist?

Check out the documentation for the properties supported by
Xerces, located at the following URL:

  http://xml.apache.org/xerces2-j/properties.html

The property identifiers that will probably help you out are
the following:

  http://apache.org/xml/properties/schema/external-schemaLocation
 
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation

You might also want to consider using a custom EntityResolver 
to do the redirection from the schema specified in the document.
Since the xsi: attributes that point to the location of the
XML Schema are merely "hints", they are not strictly required
(and your documents don't have them anyway). In this case,
Xerces uses the namespace URI as a way to try to locate the
associated XML Schema grammar -- hence the use of a custom
EntityResolver.

>     - <xsd:schema targetNamespace="mesapi/schemas/version1.0/getsomedata"

Namespace URIs should NOT be relative. You should ALWAYS try
to use absolute URIs when defining a namespace. While not
strictly disallowed, relative URIs are strongly discouraged
and are not considered a "best practice".

-- 
Andy Clark * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to