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 "Schawn E. Thropp" <th...@adlnet.org> on 2001/11/21 15:08:58 UTC

setProperty() question

I have a several questions on the use of the setProperty() function on
DOMParser.  I am useing Xerces-J 1.4.4

Question 1:
I have an implementation that inherits from DOMParser

ParserA extends DOMParser

ParserB extends ParserA

ParserB calls the
setProperty("http://apache.org/xml/properties/schema/external-schemaLocation")
to set the
location of the XML Schemas to use during parsing/validation.  What is
the proper syntax for this if you want
to set multiple XSDs to use

setProperty(
"http://apache.org/xml/properties/schema/external-schemaLocation",
                      "<schema1 namespace> <schema1 location>");

setProperty(
"http://apache.org/xml/properties/schema/external-schemaLocation",
                      "<schema2 namespace> <schema2 location>");

setProperty(
"http://apache.org/xml/properties/schema/external-schemaLocation",
                      "<schema3 namespace> <schema3 location>" );

or

setProperty(
"http://apache.org/xml/properties/schema/external-schemaLocation",
                      "<schema1 namespace> <schema1 location>"
                      "<schema2 namespace> <schema2 location>"
                      "<schema3 namespace> <schema3 location>");

Or doesn't it matter.

Question 2.
Either way that I try, it seems to not recognize the fact that I set the
property.  It always tries to look on my Desktop for the XSDs.  The
following error that I receive in my Java Console is attached.  Is there
something else I need to do to tell the DOMParser to use the properties
that I have set.

Question 3.
Am I setting the location of the schema correctly.  The scenario we have
is that we will get a zip file that contains an XML instance in the root
of the zip.  Also in the root of the zip should be the XSDs that are
need to parse/validate the XML instance.  So I need to set our DOMParser
to use the schemas that are included in the root of the zip for
parsing.  Can this be done?  If anyone needs to see an example of the
zip please let me know.

Thanks