You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Sam Ruby <ru...@us.ibm.com> on 2001/02/11 03:41:40 UTC
[PATCH] Fix regression in JAXP
The following patch will fix the compilation failures in xml-fop. The only
required portion of the fix is the handing of namespaceAware.
Index: DocumentBuilderImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java,v
retrieving revision 1.6
diff -u -r1.6 DocumentBuilderImpl.java
--- DocumentBuilderImpl.java 2001/02/07 01:56:06 1.6
+++ DocumentBuilderImpl.java 2001/02/11 02:29:04
@@ -124,16 +124,36 @@
// XXX Ignore unimplemented features for now
try {
- // Set various parameters obtained from DocumentBuilderFactory
domParser.setFeature(XERCES_FEATURE_PREFIX +
INCLUDE_IGNORABLE_WHITESPACE,
!dbf.isIgnoringElementContentWhitespace());
+ } catch (SAXException e) {
+ }
+
+ // XXX Ignore unimplemented features for now
+ try {
domParser.setFeature(XERCES_FEATURE_PREFIX +
CREATE_ENTITY_REF_NODES_FEATURE,
!dbf.isExpandEntityReferences());
- // XXX No way to control dbf.isIgnoringComments() or
- // dbf.isCoalescing()
} catch (SAXException e) {
+ }
+
+ try {
+ namespaceAware = dbf.isNamespaceAware();
+ domParser.setFeature("http://xml.org/sax/features/namespaces",
+ namespaceAware);
+ } catch (SAXException e) {
+ throw new ParserConfigurationException("Cannot set namespace "+
+ "awareness to "+ namespaceAware);
+ }
+
+ try {
+ validating = dbf.isValidating();
+ domParser.setFeature("http://xml.org/sax/features/validation",
+ validating);
+ } catch (SAXException e) {
+ throw new ParserConfigurationException("Cannot set validation to "+
+ validating);
}
} catch (SAXException e) {
// Handles both SAXNotSupportedException, SAXNotRecognizedException
- Sam Ruby
Re: [PATCH] Fix regression in JAXP
Posted by Edwin Goei <Ed...@eng.sun.com>.
Sam Ruby wrote:
>
> The following patch will fix the compilation failures in xml-fop. The only
> required portion of the fix is the handing of namespaceAware.
I just committed a fix in Xerces 1.x. I'll fix it in 2.x also.
-Edwin