> (1) How can I make sure that Xerces can find the appropriate schema when no > xsi:schemaLocation is specified? Using xsi:schemaLocation implies that > whoever is creating the xml instance knows the location of the xml schema.
There are two schema location properties, which correspond to the two xsi:
attributes. And they have the same syntax as the xsi: attributes:
http://apache.org/xml/properties/schema/external-schemaLocation
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
> (2) Could somebody point out how could I use Xerces implementation to
> validate a string (lexical value) against all the builtin simple types
and
> any derived simple types? I would like to reuse the code that is making
sure
> a dateTime follows the spec. And also convert that same string to a java
> value holder?
Good question. In fact, the schema datatype implementation in Xerces-2 was
designed with this in mind: it can be used as a separate library for string
validation. We planned to put some FAQs or samples about the usage of it,
but didn't get there yet. Here I'm attaching a sample file written by
Neeraj Bajaj, which describes how to use the library directly.
> (2) Along the same lines, could someone point me out to the appropriate
> facade/factory class in xerces implementation that would allow me to
create
> a in memory model of the schema so it could be traversed, etc?
This is not supported yet, because there is no standard API describing how
to expose such model.
Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]
(See attached file: SimpleTypeUsage.java)
SimpleTypeUsage.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
