zongaro 2003/02/03 12:49:04
Modified: java/src/org/apache/xpath Tag: XSLTC_DTM
SourceTreeManager.java
java/src/org/apache/xml/dtm/ref Tag: XSLTC_DTM
DTMManagerDefault.java
java/src/org/apache/xalan/xslt Tag: XSLTC_DTM Process.java
java/src/org/apache/xalan/transformer Tag: XSLTC_DTM
TrAXFilter.java TransformerIdentityImpl.java
java/src/org/apache/xalan/processor Tag: XSLTC_DTM
ProcessorInclude.java TransformerFactoryImpl.java
Log:
The behaviour of the Xerces-J parser recently changed to agree with its
documented behaviour with respect to the dynamic validation feature. This
causes problems for stylesheets that contain a DTD, but are not otherwise
"valid" - for instance, because the DTD contains ENTITY declarations, but no
ELEMENT declarations - because error reporting is performed for documents if
the dynamic validation feature is enabled and the document contains a DOCTYPE
declaration.
The solution is to remove code (including code that was commented out) that
enabled the Xerces dynamic validation feature.
Revision Changes Path
No revision
No revision
1.30.6.3 +0 -7 xml-xalan/java/src/org/apache/xpath/SourceTreeManager.java
Index: SourceTreeManager.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/SourceTreeManager.java,v
retrieving revision 1.30.6.2
retrieving revision 1.30.6.3
diff -u -r1.30.6.2 -r1.30.6.3
--- SourceTreeManager.java 30 Jan 2003 18:41:58 -0000 1.30.6.2
+++ SourceTreeManager.java 3 Feb 2003 20:49:02 -0000 1.30.6.3
@@ -385,8 +385,6 @@
XMLReader reader = (inputSource instanceof SAXSource)
? ((SAXSource) inputSource).getXMLReader() : null;
- boolean isUserReader = (reader != null);
-
if (null == reader)
{
try {
@@ -412,11 +410,6 @@
{
reader.setFeature("http://xml.org/sax/features/namespace-prefixes",
true);
- // Commented out as per discussion with [EMAIL PROTECTED]
- // about bug 2124.
-// if(!isUserReader)
-// reader.setFeature("http://apache.org/xml/features/validation/dynamic",
-// true);
}
catch (org.xml.sax.SAXException se)
{
No revision
No revision
1.41.4.4 +0 -19 xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java
Index: DTMManagerDefault.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMManagerDefault.java,v
retrieving revision 1.41.4.3
retrieving revision 1.41.4.4
diff -u -r1.41.4.3 -r1.41.4.4
--- DTMManagerDefault.java 30 Jan 2003 18:41:52 -0000 1.41.4.3
+++ DTMManagerDefault.java 3 Feb 2003 20:49:02 -0000 1.41.4.4
@@ -632,8 +632,6 @@
XMLReader reader = (inputSource instanceof SAXSource)
? ((SAXSource) inputSource).getXMLReader() : null;
- boolean isUserReader = (reader != null);
-
if (null == reader)
{
try
@@ -673,23 +671,6 @@
// What can we do?
// TODO: User diagnostics.
}
-
- // Commented out as per discussion with [EMAIL PROTECTED]
- // about bug 2124.
-// if(!isUserReader)
-// {
-// try
-// {
-// reader.setFeature("http://apache.org/xml/features/validation/dynamic",
-// true);
-// }
-// catch (org.xml.sax.SAXException se)
-// {
-//
-// // What can we do?
-// // TODO: User diagnostics.
-// }
-// }
return reader;
}
No revision
No revision
1.47.6.7 +0 -6 xml-xalan/java/src/org/apache/xalan/xslt/Process.java
Index: Process.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xslt/Process.java,v
retrieving revision 1.47.6.6
retrieving revision 1.47.6.7
diff -u -r1.47.6.6 -r1.47.6.7
--- Process.java 30 Jan 2003 18:41:35 -0000 1.47.6.6
+++ Process.java 3 Feb 2003 20:49:03 -0000 1.47.6.7
@@ -953,12 +953,6 @@
true);
} catch (org.xml.sax.SAXException se) {}
- try
- {
-
reader.setFeature("http://apache.org/xml/features/validation/dynamic",
- true);
- } catch (org.xml.sax.SAXException se) {}
-
th.setResult(strResult);
reader.parse(new InputSource(inFileName));
No revision
No revision
1.9.10.3 +0 -4 xml-xalan/java/src/org/apache/xalan/transformer/TrAXFilter.java
Index: TrAXFilter.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TrAXFilter.java,v
retrieving revision 1.9.10.2
retrieving revision 1.9.10.3
diff -u -r1.9.10.2 -r1.9.10.3
--- TrAXFilter.java 30 Jan 2003 18:41:33 -0000 1.9.10.2
+++ TrAXFilter.java 3 Feb 2003 20:49:03 -0000 1.9.10.3
@@ -165,10 +165,6 @@
{
parent.setFeature("http://xml.org/sax/features/namespace-prefixes",
true);
- // Commented out as per discussion with [EMAIL PROTECTED]
- // about bug 2124.
-// parent.setFeature("http://apache.org/xml/features/validation/dynamic",
-// true);
}
catch (org.xml.sax.SAXException se){}
// setParent calls setupParse...
1.18.10.5 +0 -7
xml-xalan/java/src/org/apache/xalan/transformer/TransformerIdentityImpl.java
Index: TransformerIdentityImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerIdentityImpl.java,v
retrieving revision 1.18.10.4
retrieving revision 1.18.10.5
diff -u -r1.18.10.4 -r1.18.10.5
--- TransformerIdentityImpl.java 30 Jan 2003 18:41:33 -0000 1.18.10.4
+++ TransformerIdentityImpl.java 3 Feb 2003 20:49:03 -0000 1.18.10.5
@@ -383,8 +383,6 @@
if (source instanceof SAXSource)
reader = ((SAXSource) source).getXMLReader();
- boolean isUserReader = (reader != null);
-
if (null == reader)
{
@@ -421,11 +419,6 @@
{
reader.setFeature("http://xml.org/sax/features/namespace-prefixes",
true);
- // Commented out as per discussion with [EMAIL PROTECTED]
- // about bug 2124.
-// if(!isUserReader)
-// reader.setFeature("http://apache.org/xml/features/validation/dynamic",
-// true);
}
catch (org.xml.sax.SAXException se)
{
No revision
No revision
1.20.10.6 +0 -10
xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java
Index: ProcessorInclude.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java,v
retrieving revision 1.20.10.5
retrieving revision 1.20.10.6
diff -u -r1.20.10.5 -r1.20.10.6
--- ProcessorInclude.java 30 Jan 2003 18:41:21 -0000 1.20.10.5
+++ ProcessorInclude.java 3 Feb 2003 20:49:04 -0000 1.20.10.6
@@ -269,8 +269,6 @@
reader = saxSource.getXMLReader(); // may be null
}
- boolean isUserReader = (reader != null);
-
InputSource inputSource = SAXSource.sourceToInputSource(source);
if (null == reader)
@@ -300,14 +298,6 @@
if (null != reader)
{
reader.setContentHandler(handler);
- try
- {
- if(!isUserReader)
- reader.setFeature("http://apache.org/xml/features/validation/dynamic",
- true);
- }
- catch(org.xml.sax.SAXException se) {}
-
handler.pushBaseIndentifier(inputSource.getSystemId());
try
1.41.6.8 +0 -14
xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java
Index: TransformerFactoryImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java,v
retrieving revision 1.41.6.7
retrieving revision 1.41.6.8
diff -u -r1.41.6.7 -r1.41.6.8
--- TransformerFactoryImpl.java 30 Jan 2003 18:41:22 -0000 1.41.6.7
+++ TransformerFactoryImpl.java 3 Feb 2003 20:49:04 -0000 1.41.6.8
@@ -905,8 +905,6 @@
if (source instanceof SAXSource)
reader = ((SAXSource) source).getXMLReader();
- boolean isUserReader = (reader != null);
-
if (null == reader)
{
@@ -940,18 +938,6 @@
// If you set the namespaces to true, we'll end up getting double
// xmlns attributes. Needs to be fixed. -sb
// reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
- try
- {
- if(!isUserReader)
- reader.setFeature("http://apache.org/xml/features/validation/dynamic",
- true);
- }
- catch (org.xml.sax.SAXException ex)
- {
-
- // feature not recognized
- }
-
reader.setContentHandler(builder);
reader.parse(isource);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]