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/05/30 18:17:51 UTC
cvs commit: xml-xerces/c/src/xercesc/parsers AbstractDOMParser.cpp AbstractDOMParser.hpp
tng 02/05/30 09:17:51
Modified: c/src/xercesc/parsers AbstractDOMParser.cpp
AbstractDOMParser.hpp
Log:
Add feature to optionally ignore external DTD.
Revision Changes Path
1.4 +12 -1 xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp
Index: AbstractDOMParser.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractDOMParser.cpp 28 May 2002 20:44:14 -0000 1.3
+++ AbstractDOMParser.cpp 30 May 2002 16:17:51 -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: AbstractDOMParser.cpp,v 1.3 2002/05/28 20:44:14 tng Exp $
+* $Id: AbstractDOMParser.cpp,v 1.4 2002/05/30 16:17:51 tng Exp $
*
*/
@@ -227,6 +227,12 @@
return fScanner->getExternalNoNamespaceSchemaLocation();
}
+bool AbstractDOMParser::getLoadExternalDTD() const
+{
+ return fScanner->getLoadExternalDTD();
+}
+
+
// ---------------------------------------------------------------------------
// AbstractDOMParser: Setter methods
// ---------------------------------------------------------------------------
@@ -281,6 +287,11 @@
void AbstractDOMParser::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)
{
fScanner->setExternalNoNamespaceSchemaLocation(noNamespaceSchemaLocation);
+}
+
+void AbstractDOMParser::setLoadExternalDTD(const bool newState)
+{
+ fScanner->setLoadExternalDTD(newState);
}
1.4 +32 -1 xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.hpp
Index: AbstractDOMParser.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractDOMParser.hpp 28 May 2002 20:44:14 -0000 1.3
+++ AbstractDOMParser.hpp 30 May 2002 16:17:51 -0000 1.4
@@ -55,7 +55,7 @@
*/
/*
- * $Id: AbstractDOMParser.hpp,v 1.3 2002/05/28 20:44:14 tng Exp $
+ * $Id: AbstractDOMParser.hpp,v 1.4 2002/05/30 16:17:51 tng Exp $
*
*/
#if !defined(ABSTRACTDOMPARSER_HPP)
@@ -341,6 +341,19 @@
*/
XMLCh* getExternalNoNamespaceSchemaLocation() const;
+ /** Get the 'Loading External DTD' flag
+ *
+ * This method returns the state of the parser's loading external DTD
+ * flag.
+ *
+ * @return false, if the parser is currently configured to
+ * ignore external DTD completely, true otherwise.
+ *
+ * @see #setLoadExternalDTD
+ * @see #getValidationScheme
+ */
+ bool getLoadExternalDTD() const;
+
//@}
@@ -575,6 +588,24 @@
* @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
*/
void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
+
+ /** Set the 'Loading External DTD' flag
+ *
+ * This method allows users to enable or disable the loading of external DTD.
+ * When set to false, the parser will ignore any external DTD completely
+ * if the validationScheme is set to Val_Never.
+ *
+ * The parser's default state is: true.
+ *
+ * This flag is ignored if the validationScheme is set to Val_Always or Val_Auto.
+ *
+ * @param newState The value specifying whether external DTD should
+ * be loaded or not.
+ *
+ * @see #getLoadExternalDTD
+ * @see #setValidationScheme
+ */
+ void setLoadExternalDTD(const bool newState);
//@}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org