amassari 2004/12/30 07:23:41
Modified: c/src/xercesc/parsers SAX2XMLReaderImpl.cpp SAXParser.cpp
Log:
Notify advanced handlers of the whitespace before and after the root document
element (jira# 729)
Revision Changes Path
1.42 +23 -19 xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.cpp
Index: SAX2XMLReaderImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/SAX2XMLReaderImpl.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- SAX2XMLReaderImpl.cpp 7 Dec 2004 19:45:43 -0000 1.41
+++ SAX2XMLReaderImpl.cpp 30 Dec 2004 15:23:41 -0000 1.42
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.42 2004/12/30 15:23:41 amassari
+ * Notify advanced handlers of the whitespace before and after the root
document element (jira# 729)
+ *
* Revision 1.41 2004/12/07 19:45:43 knoaman
* An option to ignore a cached DTD grammar when a document contains an
* internal and external subset.
@@ -777,20 +780,20 @@
, const bool cdataSection)
{
// Suppress the chars before the root element.
- if (!fElemDepth)
- return;
-
- // Call the installed LexicalHandler.
- if (cdataSection && fLexicalHandler)
- fLexicalHandler->startCDATA();
-
- // Just map to the SAX document handler
- if (fDocHandler)
- fDocHandler->characters(chars, length);
-
- // Call the installed LexicalHandler.
- if (cdataSection && fLexicalHandler)
- fLexicalHandler->endCDATA();
+ if (fElemDepth)
+ {
+ // Call the installed LexicalHandler.
+ if (cdataSection && fLexicalHandler)
+ fLexicalHandler->startCDATA();
+
+ // Just map to the SAX document handler
+ if (fDocHandler)
+ fDocHandler->characters(chars, length);
+
+ // Call the installed LexicalHandler.
+ if (cdataSection && fLexicalHandler)
+ fLexicalHandler->endCDATA();
+ }
//
// If there are any installed advanced handlers, then lets call them
@@ -803,17 +806,17 @@
void SAX2XMLReaderImpl::docComment(const XMLCh* const commentText)
{
- // Call the installed LexicalHandler.
- if (fLexicalHandler)
- {
+ // Call the installed LexicalHandler.
+ if (fLexicalHandler)
+ {
// SAX2 reports comment text like characters -- as an
// array with a length.
fLexicalHandler->comment(commentText,
XMLString::stringLen(commentText));
- }
+ }
//
// OK, if there are any installed advanced handlers,
- // then let's call them with this info.
+ // then let's call them with this info.
//
for (unsigned int index = 0; index < fAdvDHCount; index++)
fAdvDHList[index]->docComment(commentText);
1.38 +10 -6 xml-xerces/c/src/xercesc/parsers/SAXParser.cpp
Index: SAXParser.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/SAXParser.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- SAXParser.cpp 7 Dec 2004 19:45:43 -0000 1.37
+++ SAXParser.cpp 30 Dec 2004 15:23:41 -0000 1.38
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.38 2004/12/30 15:23:41 amassari
+ * Notify advanced handlers of the whitespace before and after the root
document element (jira# 729)
+ *
* Revision 1.37 2004/12/07 19:45:43 knoaman
* An option to ignore a cached DTD grammar when a document contains an
* internal and external subset.
@@ -939,12 +942,12 @@
, const bool cdataSection)
{
// Suppress the chars before the root element.
- if (!fElemDepth)
- return;
-
- // Just map to the SAX document handler
- if (fDocHandler)
- fDocHandler->characters(chars, length);
+ if (fElemDepth)
+ {
+ // Just map to the SAX document handler
+ if (fDocHandler)
+ fDocHandler->characters(chars, length);
+ }
//
// If there are any installed advanced handlers, then lets call them
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]