dbertoni 01/06/19 11:57:40
Modified: c/src/XercesParserLiaison XercesParserLiaison.cpp
XercesParserLiaison.hpp
Log:
Fixed but where a null systemId would cause a crash. Make sure that
namespace processing is disabled for SAXParser instances.
Revision Changes Path
1.33 +16 -5
xml-xalan/c/src/XercesParserLiaison/XercesParserLiaison.cpp
Index: XercesParserLiaison.cpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XercesParserLiaison/XercesParserLiaison.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- XercesParserLiaison.cpp 2001/06/06 21:43:22 1.32
+++ XercesParserLiaison.cpp 2001/06/19 18:57:37 1.33
@@ -543,10 +543,23 @@
void
-XercesParserLiaison::formatErrorMessage(const SAXParseException& e,
XalanDOMString& theMessage)
+XercesParserLiaison::formatErrorMessage(
+ const SAXParseException& e,
+ XalanDOMString& theMessage)
{
append(theMessage, " at (file ");
- append(theMessage, e.getSystemId());
+
+ const XalanDOMChar* const theSystemID = e.getSystemId();
+
+ if (theSystemID == 0)
+ {
+ append(theMessage, "<unknown>");
+ }
+ else
+ {
+ append(theMessage, theSystemID);
+ }
+
append(theMessage, ", line ");
append(theMessage, LongToDOMString(long(e.getLineNumber())));
append(theMessage, ", column ");
@@ -602,9 +615,7 @@
theParser->setDoValidation(m_useValidation);
- // $$$ ToDo: For the time being, we cannot process namespaces
- // with SAX due to the age of Xerces' SAX interfaces.
-// theParser->setDoNamespaces(m_doNamespaces);
+ theParser->setDoNamespaces(false);
theParser->setExitOnFirstFatalError(m_exitOnFirstFatalError);
1.24 +5 -3
xml-xalan/c/src/XercesParserLiaison/XercesParserLiaison.hpp
Index: XercesParserLiaison.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XercesParserLiaison/XercesParserLiaison.hpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- XercesParserLiaison.hpp 2001/06/06 21:43:22 1.23
+++ XercesParserLiaison.hpp 2001/06/19 18:57:38 1.24
@@ -347,9 +347,6 @@
DOM_Document
mapXercesDocument(const XalanDocument* theDocument) const;
- static void
- formatErrorMessage(const SAXParseException& e, XalanDOMString&
theMessage);
-
// Implementations for SAX ErrorHandler
virtual void
@@ -442,6 +439,11 @@
}
protected:
+
+ static void
+ formatErrorMessage(
+ const SAXParseException& e,
+ XalanDOMString& theMessage);
virtual DOMParser*
CreateDOMParser();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]