Hi,
The xerces DOMParser is observed to be crashing ( as a
known bug
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8011
) if specified Schema file is missing.
To avoid this, I am having the following proposal
+ if the file to be opened is found to be missing
+ then disable the schema / namespace validation for
the parser
This will be implemented within resolveEntity()
callback. Following is the code snippet.
LocalFileInputSource * local_file_input_source =
new
LocalFileInputSource(path_dom_string.rawBuffer());
BinFileInputStream binary_file_input_steam =
local_file_input_source->makeStream();
bool is_open =
binary_file_input_steam.getIsOpen();
if ( is_open == false )
{
/*
ValSchemes gValScheme = Val_Never;
bool gDoNamespaces = false;
bool gDoSchema = false;
setValidationScheme(gValScheme);
setDoNamespaces(gDoNamespaces);
setDoSchema(gDoSchema);
*/
}
I am not sure, how to access the parser object from
which resolveEntity callback has got initiated. I
searched all the public APIs / DOMParser.hpp /
HandlerBase.hpp, but there seems to be no direct way.
Please suggest some work-around.
With best regards,
Shirish
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]