Examples of SAXAdapter


Examples of org.apache.xalan.xsltc.runtime.SAXAdapter

     * Returns a DOMBuilder class wrapped in a SAX adapter.
     * I am not sure if we need this one anymore now that the
     * DOM builder's interface is pure SAX2 (must investigate)
     */
    public TransletOutputHandler getOutputDomBuilder() {
  return new SAXAdapter(new DOMBuilderImpl());
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.runtime.SAXAdapter

     * Returns a DOMBuilder class wrapped in a SAX adapter.
     * I am not sure if we need this one anymore now that the
     * DOM builder's interface is pure SAX2 (must investigate)
     */
    public TransletOutputHandler getOutputDomBuilder() {
  return new SAXAdapter(new DOMBuilderImpl());
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.runtime.SAXAdapter

     * I am not sure if we need this one anymore now that the
     * DOM builder's interface is pure SAX2 (must investigate)
     */
    public TransletOutputHandler getOutputDomBuilder() {
  DOMBuilder builder = getBuilder();
  return new SAXAdapter(builder, builder);
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.runtime.SAXAdapter

     * Returns a DOMBuilder class wrapped in a SAX adapter.
     * I am not sure if we need this one anymore now that the
     * DOM builder's interface is pure SAX2 (must investigate)
     */
    public TransletOutputHandler getOutputDomBuilder() {
  return new SAXAdapter(new DOMBuilderImpl());
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.runtime.SAXAdapter

     * Returns a DOMBuilder class wrapped in a SAX adapter.
     * I am not sure if we need this one anymore now that the
     * DOM builder's interface is pure SAX2 (must investigate)
     */
    public TransletOutputHandler getOutputDomBuilder() {
  return new SAXAdapter(getBuilder());
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.runtime.SAXAdapter

     * I am not sure if we need this one anymore now that the
     * DOM builder's interface is pure SAX2 (must investigate)
     */
    public TransletOutputHandler getOutputDomBuilder() {
  DOMBuilder builder = getBuilder();
  return new SAXAdapter(builder, builder);
    }
View Full Code Here

Examples of org.exist.memtree.SAXAdapter

*
*/
public class Utils {

    public static NodeImpl nodeFromString(XQueryContext context, String source) throws IOException {
        SAXAdapter adapter = new SAXAdapter(context);

        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);
       
        XMLReader xr;
    try {
      SAXParser parser = factory.newSAXParser();

      xr = parser.getXMLReader();
      xr.setContentHandler(adapter);
      xr.setProperty(Namespaces.SAX_LEXICAL_HANDLER, adapter);

    } catch (Exception e) {
      throw new IOException(e);
    }
       
        try {
            InputSource src = new InputSource(new StringReader(source));
            xr.parse(src);
           
            return (NodeImpl) adapter.getDocument();
    } catch (SAXException e) {
      throw new IOException(e);
        }
    }
View Full Code Here

Examples of org.exist.memtree.SAXAdapter

                    LOG.error(errorMsg, e);

                    throw new IOException(errorMsg, e);
            }

            final SAXAdapter adapter = new SAXAdapter();

            // allow multiple attributes of the same name attached to the same element
            // to enhance resilience against bad HTML. The last attribute value wins.
            adapter.setReplaceAttributeFlag(true);

            reader.setContentHandler(adapter);
            reader.parse(srcHtml);
            final Document doc = adapter.getDocument();
            memtreeDoc = (DocumentImpl) doc;
            memtreeDoc.setContext(context);
           
            return memtreeDoc;
  }
View Full Code Here

Examples of org.exist.memtree.SAXAdapter

        factory.setNamespaceAware(true);
        InputSource src = new InputSource(file.toURI().toASCIIString());
        SAXParser parser = factory.newSAXParser();
        XMLReader xr = parser.getXMLReader();

        SAXAdapter adapter = new SAXAdapter();
        xr.setContentHandler(adapter);
        xr.setProperty(Namespaces.SAX_LEXICAL_HANDLER, adapter);
        xr.parse(src);

        return adapter.getDocument();
    }
View Full Code Here

Examples of org.exist.memtree.SAXAdapter

      factory.setNamespaceAware(true)

      InputSource src = new InputSource(source);
      SAXParser parser = factory.newSAXParser();
      XMLReader reader = parser.getXMLReader();
      SAXAdapter adapter = new SAXAdapter();
      reader.setContentHandler(adapter);
      reader.parse(src);
   
      DocumentAtExist document = (DocumentAtExist) adapter.getDocument();
//      document.setContext(new XSLContext(broker));
      //return receiver.getDocument();
      return compile((ElementAtExist) document.getDocumentElement(), broker);
    } catch (ParserConfigurationException e) {
          LOG.debug(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.