You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/12/21 00:31:16 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath SourceTreeManager.java
sboag 00/12/20 15:31:16
Modified: java/src/org/apache/xpath SourceTreeManager.java
Log:
Call JAXP to get the reader, which was not being done!
Revision Changes Path
1.19 +20 -3 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.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- SourceTreeManager.java 2000/12/18 00:04:53 1.18
+++ SourceTreeManager.java 2000/12/20 23:31:15 1.19
@@ -409,9 +409,9 @@
catch (org.xml.sax.SAXNotRecognizedException snre){}
InputSource isource = SAXSource.sourceToInputSource(source);
-
+System.out.println("parse: "+isource.getSystemId());
reader.parse(isource);
-
+System.out.println("done with parse: "+isource.getSystemId());
if (handler instanceof org.apache.xalan.stree.SourceTreeHandler)
{
doc = ((org.apache.xalan.stree.SourceTreeHandler) handler).getRoot();
@@ -455,7 +455,24 @@
? ((SAXSource) inputSource).getXMLReader() : null;
if (null == reader)
- reader = XMLReaderFactory.createXMLReader();
+ {
+ try {
+ javax.xml.parsers.SAXParserFactory factory=
+ javax.xml.parsers.SAXParserFactory.newInstance();
+ factory.setNamespaceAware( true );
+ javax.xml.parsers.SAXParser jaxpParser=
+ factory.newSAXParser();
+ reader=jaxpParser.getXMLReader();
+
+ } catch( javax.xml.parsers.ParserConfigurationException ex ) {
+ throw new org.xml.sax.SAXException( ex );
+ } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) {
+ throw new org.xml.sax.SAXException( ex1.toString() );
+ } catch( NoSuchMethodError ex2 ) {
+ }
+ if(null == reader)
+ reader = XMLReaderFactory.createXMLReader();
+ }
try
{