Examples of XPathReader


Examples of org.jaxen.saxpath.XPathReader

        if (xpathStr.length() == 0) {
            throw new CompilationException(__msgs.errXPathSyntax(xpathStr));
        }

        try {
            XPathReader reader = XPathReaderFactory.createReader();
            JaxenBpelHandler handler = new JaxenBpelHandler(_bpelNsURI, out, source.getNamespaceContext(),
                    _compilerContext);
            reader.setXPathHandler(handler);

            reader.parse(xpathStr);
            out.xpath = xpathStr;
        } catch (CompilationExceptionWrapper e) {
            CompilationException ce = e.getCompilationException();
            if (ce == null) {
                ce = new CompilationException(__msgs.errUnexpectedCompilationError(e.getMessage()), e);
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

        if (xpathStr.length() == 0) {
          throw new CompilationException(__msgs.errXPathSyntax(xpathStr));
        }

        try {
            XPathReader reader = XPathReaderFactory.createReader();
            JaxenBpelHandler handler = new JaxenBpelHandler(_bpelNsURI, out, source.getNamespaceContext(),
                    _compilerContext);
            reader.setXPathHandler(handler);

            reader.parse(xpathStr);
            out.xpath = xpathStr;
        } catch (CompilationExceptionWrapper e) {
            CompilationException ce = e.getCompilationException();
            if (ce == null) {
                ce = new CompilationException(__msgs.errUnexpectedCompilationError(e.getMessage()), e);
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

        if (xpathStr.length() == 0) {
          throw new CompilationException(__msgs.errXPathSyntax(xpathStr));
        }

        try {
            XPathReader reader = XPathReaderFactory.createReader();
            JaxenBpelHandler handler = new JaxenBpelHandler(_bpelNsURI, out, source.getNamespaceContext(),
                    _compilerContext);
            reader.setXPathHandler(handler);

            reader.parse(xpathStr);
            out.xpath = xpathStr;
        } catch (CompilationExceptionWrapper e) {
            CompilationException ce = e.getCompilationException();
            if (ce == null) {
                ce = new CompilationException(__msgs.errUnexpectedCompilationError(e.getMessage()), e);
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

  private static final String XPATH_TO_PARSE = "example1/example2";

  @Test
  @Ignore("Comment this line when it's actually necessary to run this test")
  public void test() throws SAXPathException {
    XPathReader reader = XPathReaderFactory.createReader();
    MethodTracker methodTracker = new MethodTracker();

    XPathHandler handler = (XPathHandler) Proxy.newProxyInstance(
        XPathHandler.class.getClassLoader(),
        new Class<?>[] { XPathHandler.class }, methodTracker);
    reader.setXPathHandler(handler);

    reader.parse(XPATH_TO_PARSE);

    System.out.print(methodTracker.getLog());
  }
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

     *          interface.
     */
    public static XPathReader createReader(String className) throws org.jaxen.saxpath.SAXPathException
    {
        Class readerClass  = null;
        XPathReader reader = null;

        try
        {
            // Use the full version of Class.forName(), so as to
            // work better in sandboxed environments, such as
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

        if (xpathStr.length() == 0) {
          throw new CompilationException(__msgs.errXPathSyntax(xpathStr));
        }

        try {
            XPathReader reader = XPathReaderFactory.createReader();
            JaxenBpelHandler handler = new JaxenBpelHandler(_bpelNsURI, out, source.getNamespaceContext(),
                    _compilerContext);
            reader.setXPathHandler(handler);

            reader.parse(xpathStr);
            out.xpath = xpathStr;
        } catch (CompilationExceptionWrapper e) {
            CompilationException ce = e.getCompilationException();
            if (ce == null) {
                ce = new CompilationException(__msgs.errUnexpectedCompilationError(e.getMessage()), e);
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

        String path = null;

        try
        {
            // XXX Jiffie solution?
            XPathReader reader = XPathReaderFactory.createReader();
            JaxenHandler handler = new JaxenHandler();
            handler.setXPathFactory( new DefaultXPathFactory() );
            reader.setXPathHandler( handler );

            for ( int i = 0; i < paths.length; i++ ) {
                path = paths[i];
                reader.parse(path);
                handler.getXPathExpr(false);
                handler.getXPathExpr();
            }
        }
        catch (Exception e)
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

        }
    }

    public void testBogusPaths() throws SAXPathException
    {
        XPathReader reader = XPathReaderFactory.createReader();
        JaxenHandler handler = new JaxenHandler();
        handler.setXPathFactory( new DefaultXPathFactory() );
        reader.setXPathHandler( handler );
       
        for ( int i = 0; i < bogusPaths.length; i++ ) {
            String path = bogusPaths[i];

            try
            {                   
                reader.parse(path);
                XPathExpr xpath = handler.getXPathExpr(false);
                fail( "Parsed bogus path as: " + xpath );
            }
            catch (XPathSyntaxException e)
            {
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

    public void testDefault() throws SAXPathException
    {
        System.setProperty( XPathReaderFactory.DRIVER_PROPERTY,
                            "" );
        XPathReader reader = XPathReaderFactory.createReader();
        assertNotNull( reader );
    }
View Full Code Here

Examples of org.jaxen.saxpath.XPathReader

    public void testValidByProperty() throws SAXPathException
    {
        System.setProperty( XPathReaderFactory.DRIVER_PROPERTY,
                            "org.jaxen.test.MockXPathReader"  );

        XPathReader reader = XPathReaderFactory.createReader();
        assertNotNull( reader );
        assertSame( MockXPathReader.class, reader.getClass() );
    }
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.