Examples of XPathSyntaxException


Examples of org.jaxen.XPathSyntaxException

            Collections.sort(results, new NodeComparator(context.getNavigator()));
   
            return results;
        }
        catch (ClassCastException e) {
            throw new XPathSyntaxException(this.getText(), context.getPosition(), "Unions are only allowed over node-sets");
        }
    }
View Full Code Here

Examples of org.jaxen.XPathSyntaxException

            Collections.sort(results, new NodeComparator(context.getNavigator()));
   
            return results;
        }
        catch (ClassCastException e) {
            throw new XPathSyntaxException(this.getText(), context.getPosition(), "Unions are only allowed over node-sets");
        }
    }
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

                    {
                        steps();
                        break;
                    }
                    default:
                        XPathSyntaxException ex = this.createSyntaxException("Location path cannot end with //");
                        throw ex;
                }
                break;
            }
        }
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

            {
                return;
            }
            default:
            {
                XPathSyntaxException ex = createSyntaxException( "Expected one of '.', '..', '@', '*', <QName>" );
                throw ex;
            }
        }

        do
        {
            if ( ( LA(1) == TokenTypes.SLASH)
                 ||
                 ( LA(1) == TokenTypes.DOUBLE_SLASH ) )
            {
                switch ( LA(1) )
                {
                    case TokenTypes.SLASH:
                    {
                        match( TokenTypes.SLASH );
                        break;
                    }
                    case TokenTypes.DOUBLE_SLASH:
                    {
                        getXPathHandler().startAllNodeStep( Axis.DESCENDANT_OR_SELF );
                        getXPathHandler().endAllNodeStep();

                        match( TokenTypes.DOUBLE_SLASH );
                        break;
                    }
                }
            }
            else
            {
                return;
            }
           
            switch ( LA(1) )
            {
                case TokenTypes.DOT:
                case TokenTypes.DOT_DOT:
                case TokenTypes.AT:
                case TokenTypes.IDENTIFIER:
                case TokenTypes.STAR:
                {
                    step();
                    break;
                }
                default:
                {
                    XPathSyntaxException ex = createSyntaxException( "Expected one of '.', '..', '@', '*', <QName>" );
                    throw ex;
                }
            }

        } while ( true );
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

            {
                nameTest( axis );
                break;
            }
            default:
                XPathSyntaxException ex = createSyntaxException("Expected <QName> or *");
                throw ex;
        }
    }
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

            getXPathHandler().endCommentNodeStep();
        }
        else
        {
            XPathSyntaxException ex = createSyntaxException( "Expected node-type" );
            throw ex;
        }
    }
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

            tokens.remove(0);
            return token;
        }

       
        XPathSyntaxException ex = createSyntaxException( "Expected: " + TokenTypes.getTokenText( tokenType ) );
        throw ex;
    }
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

    private XPathSyntaxException createSyntaxException(String message)
    {
        String xpath    = this.lexer.getXPath();
        int    position = LT(1).getTokenBegin();

        return new XPathSyntaxException( xpath,
                                         position,
                                         message );
    }
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

        String xpath    = this.lexer.getXPath();
        int    position = LT(1).getTokenBegin();

        String message  = "Expected valid axis name instead of [" + invalidAxis + "]";

        throw new XPathSyntaxException( xpath,
                                        position,
                                        message );
    }
View Full Code Here

Examples of org.jaxen.saxpath.XPathSyntaxException

        getXPathHandler().endXPath();

        if ( LA(1) != TokenTypes.EOF )
        {
            XPathSyntaxException ex = createSyntaxException( "Unexpected '" + LT(1).getTokenText() + "'" );
            throw ex;
        }

        lexer  = null;
        tokens = null;
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.