Package de.danet.an.workflow.util

Examples of de.danet.an.workflow.util.SAXEventBufferImpl


      jellyParser.setContext(context);
      jellyParser.configure ();
      seb.emit (new NamespaceAttributesFilter(jellyParser));
      Script script = jellyParser.getScript ();
      script.compile ();
      SAXEventBufferImpl jres = new SAXEventBufferImpl ();
      jres.startDocument ();
      script.run (context, new XMLOutput(jres));
      jres.endDocument ();
      jres.pack ();
      return jres;
  } catch (JellyException e) {
      throw (IllegalArgumentException)(new IllegalArgumentException
       ("Error evaluating jelly script: " + e.getMessage ()))
    .initCause (e);
View Full Code Here


    xr = spf.newSAXParser().getXMLReader();
      } catch (SAXException e) {
    xr = new XmlnsUrisPatcher
        (spf.newSAXParser().getXMLReader());
      }
      SAXEventBufferImpl seb = new SAXEventBufferImpl ();
      XMLFilterImpl filter = new XMLFilterImpl () {
        private int level = 0;
        public void startElement
      (String uri, String localName, String qName,
       Attributes atts) throws SAXException {
      if (level > 0) {
          super.startElement (uri,localName,qName,atts);
      }
      level += 1;
        }
        public void endElement
      (String uri, String localName, String qName)
      throws SAXException{
      level -= 1;
      if (level > 0) {
          super.endElement (uri, localName, qName);
      }
        }
    };
      filter.setContentHandler (seb);
      xr.setContentHandler (filter);
      xr.parse (new InputSource
          (new StringReader
           ("<temporary-root>" + text + "</temporary-root>")));
      seb.pack();
      return seb;
  } catch (ParserConfigurationException e) {
      throw new IllegalArgumentException
    ("Error initiliazing schema type: " + e.getMessage ());
  } catch (SAXException e) {
View Full Code Here

     * Simple test method to return a string representation of the given XML.
     * @ejb.interface-method view-type="remote"
     * @ejb.transaction type="NotSupported"
     */
    public String toString(SAXEventBuffer sax) {
        SAXEventBufferImpl impl = (SAXEventBufferImpl) sax;
       
        return impl.toString(false);
    }
View Full Code Here

        (SAXTransformerFactory transformerFactory, Templates templates) {
        this.transformerFactory = transformerFactory;
        this.templates = templates;
       
        // Prepare result chain
        result = new SAXEventBufferImpl ();
        if (templates == null) {
            setContentHandler(result);
        } else {
            try {
                TransformerHandler th
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.util.SAXEventBufferImpl

Copyright © 2018 www.massapicom. 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.