You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/03/27 20:46:22 UTC
cvs commit: xml-xerces/c/src/xercesc/parsers DOMParser.cpp DOMParser.hpp IDOMParser.cpp IDOMParser.hpp
tng 02/03/27 11:46:22
Modified: c/src/xercesc/parsers DOMParser.cpp DOMParser.hpp
IDOMParser.cpp IDOMParser.hpp
Log:
[Bug 1173] DOMParser entity resolution property is messed about.
Revision Changes Path
1.4 +2 -2 xml-xerces/c/src/xercesc/parsers/DOMParser.cpp
Index: DOMParser.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/DOMParser.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DOMParser.cpp 27 Mar 2002 18:12:57 -0000 1.3
+++ DOMParser.cpp 27 Mar 2002 19:46:21 -0000 1.4
@@ -59,7 +59,7 @@
* handler with the scanner. In these handler methods, appropriate DOM nodes
* are created and added to the DOM tree.
*
-* $Id: DOMParser.cpp,v 1.3 2002/03/27 18:12:57 tng Exp $
+* $Id: DOMParser.cpp,v 1.4 2002/03/27 19:46:21 tng Exp $
*
*/
@@ -99,7 +99,7 @@
fErrorHandler(0)
, fEntityResolver(0)
-, fCreateEntityReferenceNodes(false)
+, fCreateEntityReferenceNodes(true)
, fToCreateXMLDeclTypeNode(false)
, fIncludeIgnorableWhitespace(true)
, fNodeStack(0)
1.3 +13 -15 xml-xerces/c/src/xercesc/parsers/DOMParser.hpp
Index: DOMParser.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/DOMParser.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMParser.hpp 20 Feb 2002 18:17:01 -0000 1.2
+++ DOMParser.hpp 27 Mar 2002 19:46:21 -0000 1.3
@@ -55,7 +55,7 @@
*/
/*
- * $Id: DOMParser.hpp,v 1.2 2002/02/20 18:17:01 tng Exp $
+ * $Id: DOMParser.hpp,v 1.3 2002/03/27 19:46:21 tng Exp $
*
*/
@@ -299,16 +299,8 @@
/** Get the 'include entity references' flag
*
- * This flag specifies whether the parser is
+ * This method returns the flag that specifies whether the parser is
* creating entity reference nodes in the DOM tree being produced.
- * When the 'create' flag is
- * true, the DOM tree will contain entity reference nodes.
- * When the 'create' flag is false, no entity reference nodes
- * are included in the DOM tree.
- * <p>The replacement text
- * of the entity is included in either case, either as a
- * child of the Entity Reference node or in place at the location
- * of the reference.
*
* @return The state of the create entity reference node
* flag.
@@ -483,16 +475,18 @@
* This method allows the user to specify whether the parser should
* create entity reference nodes in the DOM tree being produced.
* When the 'create' flag is
- * true, the DOM tree constains entity reference nodes.
- * When the 'create' flag is false, no entity reference nodes
- * are included in the DOM tree.
+ * true, the parser will create EntityReference nodes in the DOM tree.
+ * The EntityReference nodes and their child nodes will be read-only.
+ * When the 'create' flag is false, no EntityReference nodes will be created.
* <p>The replacement text
* of the entity is included in either case, either as a
* child of the Entity Reference node or in place at the location
* of the reference.
+ * <p>The default value is 'true'.
*
* @param create The new state of the create entity reference nodes
* flag.
+ * @see #getCreateEntityReferenceNodes
*/
void setCreateEntityReferenceNodes(const bool create);
@@ -1250,9 +1244,11 @@
* entity. When the 'do expansion' flag is false, the DOM tree
* contains an extra entity reference node, whose children is the
* sub tree of the replacement text.
+ * <p>The default value is 'false'.
*
* @param expand The new state of the expand entity reference
* flag.
+ * @see #setCreateEntityReferenceNodes
*/
void setExpandEntityReferences(const bool expand);
@@ -1266,6 +1262,8 @@
* the parser, 'false' otherwise.
*
* @see #setExpandEntityReferences
+ * @see #setCreateEntityReferenceNodes
+ * @see #getCreateEntityReferenceNodes
*/
bool getExpandEntityReferences() const;
@@ -1551,7 +1549,7 @@
inline bool DOMParser::getExpandEntityReferences() const
{
- return fCreateEntityReferenceNodes;
+ return !fCreateEntityReferenceNodes;
}
inline bool DOMParser::getCreateEntityReferenceNodes() const
{
@@ -1579,7 +1577,7 @@
// ---------------------------------------------------------------------------
inline void DOMParser::setExpandEntityReferences(const bool expand)
{
- fCreateEntityReferenceNodes = expand;
+ fCreateEntityReferenceNodes = !expand;
}
inline void DOMParser::setCreateEntityReferenceNodes(const bool create)
1.4 +2 -2 xml-xerces/c/src/xercesc/parsers/IDOMParser.cpp
Index: IDOMParser.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/IDOMParser.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- IDOMParser.cpp 27 Mar 2002 18:12:57 -0000 1.3
+++ IDOMParser.cpp 27 Mar 2002 19:46:21 -0000 1.4
@@ -59,7 +59,7 @@
* handler with the scanner. In these handler methods, appropriate IDOM nodes
* are created and added to the DOM tree.
*
-* $Id: IDOMParser.cpp,v 1.3 2002/03/27 18:12:57 tng Exp $
+* $Id: IDOMParser.cpp,v 1.4 2002/03/27 19:46:21 tng Exp $
*
*/
@@ -105,7 +105,7 @@
fErrorHandler(0)
, fEntityResolver(0)
-, fCreateEntityReferenceNodes(false)
+, fCreateEntityReferenceNodes(true)
, fIncludeIgnorableWhitespace(true)
, fNodeStack(0)
, fScanner(0)
1.4 +13 -15 xml-xerces/c/src/xercesc/parsers/IDOMParser.hpp
Index: IDOMParser.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/IDOMParser.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- IDOMParser.hpp 21 Mar 2002 15:36:05 -0000 1.3
+++ IDOMParser.hpp 27 Mar 2002 19:46:21 -0000 1.4
@@ -55,7 +55,7 @@
*/
/*
- * $Id: IDOMParser.hpp,v 1.3 2002/03/21 15:36:05 knoaman Exp $
+ * $Id: IDOMParser.hpp,v 1.4 2002/03/27 19:46:21 tng Exp $
*
*/
@@ -326,21 +326,15 @@
* the parser, 'false' otherwise.
*
* @see #setExpandEntityReferences
+ * @see #setCreateEntityReferenceNodes
+ * @see #getCreateEntityReferenceNodes
*/
bool getExpandEntityReferences() const;
/** Get the 'include entity references' flag
*
- * This flag specifies whether the parser is
+ * This method returns the flag that specifies whether the parser is
* creating entity reference nodes in the DOM tree being produced.
- * When the 'create' flag is
- * true, the DOM tree will contain entity reference nodes.
- * When the 'create' flag is false, no entity reference nodes
- * are included in the DOM tree.
- * <p>The replacement text
- * of the entity is included in either case, either as a
- * child of the Entity Reference node or in place at the location
- * of the reference.
*
* @return The state of the create entity reference node
* flag.
@@ -509,9 +503,11 @@
* entity. When the 'do expansion' flag is false, the DOM tree
* contains an extra entity reference node, whose children is the
* sub tree of the replacement text.
+ * <p>The default value is 'false'.
*
* @param expand The new state of the expand entity reference
* flag.
+ * @see #setCreateEntityReferenceNodes
*/
void setExpandEntityReferences(const bool expand);
@@ -520,16 +516,18 @@
* This method allows the user to specify whether the parser should
* create entity reference nodes in the DOM tree being produced.
* When the 'create' flag is
- * true, the DOM tree constains entity reference nodes.
- * When the 'create' flag is false, no entity reference nodes
- * are included in the DOM tree.
+ * true, the parser will create EntityReference nodes in the DOM tree.
+ * The EntityReference nodes and their child nodes will be read-only.
+ * When the 'create' flag is false, no EntityReference nodes will be created.
* <p>The replacement text
* of the entity is included in either case, either as a
* child of the Entity Reference node or in place at the location
* of the reference.
+ * <p>The default value is 'true'.
*
* @param create The new state of the create entity reference nodes
* flag.
+ * @see #getCreateEntityReferenceNodes
*/
void setCreateEntityReferenceNodes(const bool create);
@@ -1551,7 +1549,7 @@
inline bool IDOMParser::getExpandEntityReferences() const
{
- return fCreateEntityReferenceNodes;
+ return !fCreateEntityReferenceNodes;
}
inline bool IDOMParser::getCreateEntityReferenceNodes() const
{
@@ -1569,7 +1567,7 @@
// ---------------------------------------------------------------------------
inline void IDOMParser::setExpandEntityReferences(const bool expand)
{
- fCreateEntityReferenceNodes = expand;
+ fCreateEntityReferenceNodes = !expand;
}
inline void IDOMParser::setCreateEntityReferenceNodes(const bool create)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org