I have a class that inherits "DOMParser" called "ADLDOMParser".When an
xml
file is read in I would like to use a different copy of control
documents,
so I need to change the "schemaLocation". When I simply call
setProperty()
I get a "SAXNotRecognizedException". Why would this exception be
thrown?
What could I be doing wrong?
public boolean setControlDocsProperty()
{
boolean result = true;
String xmlSchema = "http://www.w3.org/2001/XMLSchema-instance";
String imscpSchema =
"http://www.imsproject.org/xsd/imscp_rootv1p1p2";
String imsmdSchema =
"http://www.imsproject.org/xsd/imsmd_rootv1p2";
String adlcpSchema = "http://www.adlnet.org/xsd/adl_cp_rootv1p1";
try
{
setProperty(
"http://apache.org/xml/properties/external-schemaLocation",
xmlSchema + " ..\\..\\..\\..\\..\\ims_xml.xsd "
+
imscpSchema + "
..\\..\\..\\..\\..\\imscp_rootv1p1p2.xsd " +
adlcpSchema + "
..\\..\\..\\..\\..\\adl_cp_rootv1p1.xsd" +
imsmdSchema + "
..\\..\\..\\..\\..\\imsmd_rootv1p2.xsd
" );
}
catch ( SAXNotRecognizedException snre )
{
System.out.println("ERROR -
ADLDOMParserTester::setControlDocs()");
System.out.println("-- Error in setting parser property. SAX
Not
Recognized!");
result = false;
}
catch ( SAXNotSupportedException snse )
{
System.out.println("ERROR -
ADLDOMParserTester::setControlDocs()");
System.out.println("-- Error in setting parser property. SAX
Not
Supported!");
result = false;
}
catch ( SAXException se )
{
System.out.println("ERROR -
ADLDOMParserTester::setControlDocs()");
System.out.println("-- Error in setting parser property.");
result = false;
}
return result;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]