You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by ar...@apache.org on 2003/08/13 14:56:25 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java
aruny 2003/08/13 05:56:25
Modified: java/src/org/apache/xalan/processor Tag: jaxp-1_3_0-branch
TransformerFactoryImpl.java
Log:
Description:Applying patch for:
1. As per JAXP1.2 spec, if a SAXSource is created using a SAX InputSource then
the Transformer or SAXTransformerFactory creates a reader via
org.xml.sax.helpers.XMLReaderFactory (if setXMLReader is not used),
sets itself as the reader s org.xml.sax.ContentHandler , and calls
reader.parse(inputSource).
Revision Changes Path
No revision
No revision
1.52.2.1 +10 -2 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.52
retrieving revision 1.52.2.1
diff -u -r1.52 -r1.52.2.1
--- TransformerFactoryImpl.java 24 Apr 2003 15:48:18 -0000 1.52
+++ TransformerFactoryImpl.java 13 Aug 2003 12:56:25 -0000 1.52.2.1
@@ -855,6 +855,16 @@
if (source instanceof SAXSource)
reader = ((SAXSource) source).getXMLReader();
+ // As per JAXP1.2 spec, if a SAXSource is created using a SAX InputSource then
+ // the Transformer or SAXTransformerFactory creates a reader via
+ // org.xml.sax.helpers.XMLReaderFactory (if setXMLReader is not used),
+ // sets itself as the reader s org.xml.sax.ContentHandler , and calls
+ // reader.parse(inputSource).
+ if (null == reader){
+ reader = XMLReaderFactory.createXMLReader();
+ reader.setFeature("http://xml.org/sax/features/namespaces", true);
+ }
+
if (null == reader)
{
@@ -882,8 +892,6 @@
catch (AbstractMethodError ame){}
}
- if (null == reader)
- reader = XMLReaderFactory.createXMLReader();
// If you set the namespaces to true, we'll end up getting double
// xmlns attributes. Needs to be fixed. -sb
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org