tmiller 01/07/20 07:41:06
Modified: java/src/org/apache/xalan/xsltc/trax
TransformerFactoryImpl.java
Log:
in progress, adding DOMSource support
Revision Changes Path
1.11 +15 -1
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
Index: TransformerFactoryImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TransformerFactoryImpl.java 2001/07/20 12:52:18 1.10
+++ TransformerFactoryImpl.java 2001/07/20 14:41:06 1.11
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: TransformerFactoryImpl.java,v 1.10 2001/07/20 12:52:18 morten
Exp $
+ * @(#)$Id: TransformerFactoryImpl.java,v 1.11 2001/07/20 14:41:06 tmiller
Exp $
*
* The Apache Software License, Version 1.1
*
@@ -84,6 +84,8 @@
import org.apache.xalan.xsltc.compiler.util.Util;
import org.apache.xalan.xsltc.runtime.AbstractTranslet;
+import org.w3c.dom.Document;
+import javax.xml.transform.dom.DOMSource;
/**
* Implementation of a JAXP1.1 SAXTransformerFactory for Translets.
*/
@@ -373,6 +375,18 @@
input = sax.getInputSource();
// Pass the SAX parser to the compiler
xsltc.setXMLReader(sax.getXMLReader());
+ }
+ // handle DOMSource
+ else if (source instanceof DOMSource) {
+ throw new TransformerConfigurationException(
+ "DOMSource not supported yet.");
+ /****
+ final DOMSource domsrc = (DOMSource)source;
+ final Document dom = (Document)domsrc.getNode();
+ final DOM2SAX dom2sax = new DOM2SAX(dom);
+ xsltc.setXMLReader(dom2sax);
+ input = null;
+ ****/
}
// Try to get InputStream or Reader from StreamSource
else if (source instanceof StreamSource) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]