You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by nd...@apache.org on 2005/04/12 22:35:02 UTC
cvs commit: xml-commons/java/src/org/apache/xml/resolver/tools ResolvingXMLReader.java
ndw 2005/04/12 13:35:02
Modified: java/src/org/apache/xml/resolver/tools
ResolvingXMLReader.java
Log:
Fix bug #34135: ResolvingXMLReader is not namespace aware
Revision Changes Path
1.6 +10 -0 xml-commons/java/src/org/apache/xml/resolver/tools/ResolvingXMLReader.java
Index: ResolvingXMLReader.java
===================================================================
RCS file: /home/cvs/xml-commons/java/src/org/apache/xml/resolver/tools/ResolvingXMLReader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ResolvingXMLReader.java 2 Sep 2003 07:05:08 -0000 1.5
+++ ResolvingXMLReader.java 12 Apr 2005 20:35:02 -0000 1.6
@@ -79,6 +79,12 @@
* @version 1.0
*/
public class ResolvingXMLReader extends ResolvingXMLFilter {
+ /** Make the parser Namespace aware? */
+ public static boolean namespaceAware = true;
+
+ /** Make the parser validating? */
+ public static boolean validating = false;
+
/**
* Construct a new reader from the JAXP factory.
*
@@ -89,6 +95,8 @@
public ResolvingXMLReader() {
super();
SAXParserFactory spf = SAXParserFactory.newInstance();
+ spf.setNamespaceAware(namespaceAware);
+ spf.setValidating(validating);
try {
SAXParser parser = spf.newSAXParser();
setParent(parser.getXMLReader());
@@ -107,6 +115,8 @@
public ResolvingXMLReader(CatalogManager manager) {
super(manager);
SAXParserFactory spf = SAXParserFactory.newInstance();
+ spf.setNamespaceAware(namespaceAware);
+ spf.setValidating(validating);
try {
SAXParser parser = spf.newSAXParser();
setParent(parser.getXMLReader());