1 50 51 package org.openlaszlo.iv.flash.xml.apache; 52 53 import org.openlaszlo.iv.flash.xml.apache.functions.*; 54 55 import org.openlaszlo.iv.flash.xml.*; 56 import org.openlaszlo.iv.flash.context.*; 57 58 import org.w3c.dom.*; 59 import javax.xml.parsers.*; 60 import javax.xml.transform.TransformerException ; 61 62 67 public class XMLFactoryImpl extends XMLFactory { 68 69 private DocumentBuilder builder; 70 private XPathProcessor xpathProcessor; 71 72 public XMLFactoryImpl( DocumentBuilderFactory factory ) throws ParserConfigurationException { 73 builder = factory.newDocumentBuilder(); 74 75 org.apache.xpath.compiler.FunctionTable.installFunction("serialize-node", new FuncSerialize()); 77 org.apache.xpath.compiler.FunctionTable.installFunction("serialize", new FuncSerialize1()); 78 } 80 81 public DocumentBuilder getDocumentBuilder() { 82 return builder; 83 } 84 85 public XMLContext newXMLContext( Context parent, Node node ) { 86 return new XMLContextImpl(parent, node); 87 } 88 89 public XPathProcessor getXPathProcessor() { 90 if( xpathProcessor == null ) { 91 xpathProcessor = new XPathProcessorImpl(); 92 } 93 return xpathProcessor; 94 } 95 96 } 97 98 99 100 | Popular Tags |