@Test public void shouldParseKindTest() { assertThat(parser.parseKindTest(tokenize("node()")), is(instanceOf(AnyKindTest.class))); assertThat(parser.parseKindTest(tokenize("comment()")), is(instanceOf(CommentTest.class))); assertThat(parser.parseKindTest(tokenize("text()")), is(instanceOf(TextTest.class))); assertThat(parser.parseKindTest(tokenize("document-node(element(foo:bar))")), is(instanceOf(DocumentTest.class))); assertThat(parser.parseKindTest(tokenize("element(foo:bar)")), is(instanceOf(ElementTest.class))); assertThat(parser.parseKindTest(tokenize("schema-element(foo:bar)")), is(instanceOf(SchemaElementTest.class))); assertThat(parser.parseKindTest(tokenize("attribute(foo:bar)")), is(instanceOf(AttributeTest.class))); assertThat(parser.parseKindTest(tokenize("schema-attribute(foo:bar)")), is(instanceOf(SchemaAttributeTest.class))); }
protected KindTest parseKindTest( TokenStream tokens ) { KindTest result = parseAnyKindTest(tokens); if (result == null) result = parseDocumentTest(tokens); if (result == null) result = parseElementTest(tokens); if (result == null) result = parseAttributeTest(tokens); if (result == null) result = parseSchemaElementTest(tokens); if (result == null) result = parseSchemaAttributeTest(tokens); if (result == null) result = parsePITest(tokens); if (result == null) result = parseCommentTest(tokens); if (result == null) result = parseTextTest(tokens); return result; }
XPathParser { protected KindTest parseKindTest( TokenStream tokens ) { KindTest result = parseAnyKindTest(tokens); if (result == null) result = parseDocumentTest(tokens); if (result == null) result = parseElementTest(tokens); if (result == null) result = parseAttributeTest(tokens); if (result == null) result = parseSchemaElementTest(tokens); if (result == null) result = parseSchemaAttributeTest(tokens); if (result == null) result = parsePITest(tokens); if (result == null) result = parseCommentTest(tokens); if (result == null) result = parseTextTest(tokens); return result; } }
XPathParser { protected KindTest parseKindTest( TokenStream tokens ) { KindTest result = parseAnyKindTest(tokens); if (result == null) result = parseDocumentTest(tokens); if (result == null) result = parseElementTest(tokens); if (result == null) result = parseAttributeTest(tokens); if (result == null) result = parseSchemaElementTest(tokens); if (result == null) result = parseSchemaAttributeTest(tokens); if (result == null) result = parsePITest(tokens); if (result == null) result = parseCommentTest(tokens); if (result == null) result = parseTextTest(tokens); return result; } XPathParser( TypeSystem context ); }
XPathParser { protected KindTest parseKindTest( TokenStream tokens ) { KindTest result = parseAnyKindTest(tokens); if (result == null) result = parseDocumentTest(tokens); if (result == null) result = parseElementTest(tokens); if (result == null) result = parseAttributeTest(tokens); if (result == null) result = parseSchemaElementTest(tokens); if (result == null) result = parseSchemaAttributeTest(tokens); if (result == null) result = parsePITest(tokens); if (result == null) result = parseCommentTest(tokens); if (result == null) result = parseTextTest(tokens); return result; } XPathParser( TypeSystem context ); Component parseXPath( String xpath ); }
XPathParser { protected KindTest parseKindTest( TokenStream tokens ) { KindTest result = parseAnyKindTest(tokens); if (result == null) result = parseDocumentTest(tokens); if (result == null) result = parseElementTest(tokens); if (result == null) result = parseAttributeTest(tokens); if (result == null) result = parseSchemaElementTest(tokens); if (result == null) result = parseSchemaAttributeTest(tokens); if (result == null) result = parsePITest(tokens); if (result == null) result = parseCommentTest(tokens); if (result == null) result = parseTextTest(tokens); return result; } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }