/** * Make an ItemType representing a document-node() test with an embedded element test. * This reflects the XPath syntax <code>document-node(element(N, T))</code> or * <code>document-node(schema-element(N))</code>. * <p>It is undefined whether two calls supplying the same argument values will * return the same ItemType object.</p> * * @param elementTest the elementTest. An IllegalArgumentException is thrown if the supplied * ItemTest is not an elementTest or schemaElementTest. * @return a new ItemType representing the document test */ public ItemType getDocumentTest(ItemType elementTest) { net.sf.saxon.type.ItemType test = elementTest.getUnderlyingItemType(); if (test.getPrimitiveType() != Type.ELEMENT) { throw new IllegalArgumentException("Supplied itemType is not an element test"); } DocumentNodeTest docTest = new DocumentNodeTest((NodeTest) test); return new ConstructedItemType(docTest, processor); }
/** * Make an ItemType representing a document-node() test with an embedded element test. * This reflects the XPath syntax <code>document-node(element(N, T))</code> or * <code>document-node(schema-element(N))</code>. * <p>It is undefined whether two calls supplying the same argument values will * return the same ItemType object.</p> * * @param elementTest the elementTest. An IllegalArgumentException is thrown if the supplied * ItemTest is not an elementTest or schemaElementTest. * @return a new ItemType representing the document test */ public ItemType getDocumentTest(ItemType elementTest) { net.sf.saxon.type.ItemType test = elementTest.getUnderlyingItemType(); if (test.getPrimitiveType() != Type.ELEMENT) { throw new IllegalArgumentException("Supplied itemType is not an element test"); } DocumentNodeTest docTest = new DocumentNodeTest((NodeTest) test); return new ConstructedItemType(docTest, processor); }
/** * Make an ItemType representing a document-node() test with an embedded element test. * This reflects the XPath syntax <code>document-node(element(N, T))</code> or * <code>document-node(schema-element(N))</code>. * * <p>It is undefined whether two calls supplying the same argument values will * return the same ItemType object.</p> * * @param elementTest the elementTest. An IllegalArgumentException is thrown if the supplied * ItemTest is not an elementTest or schemaElementTest. * @return a new ItemType representing the document test */ public ItemType getDocumentTest(ItemType elementTest) { net.sf.saxon.type.ItemType test = elementTest.getUnderlyingItemType(); if (test.getPrimitiveType() != Type.ELEMENT) { throw new IllegalArgumentException("Supplied itemType is not an element test"); } DocumentNodeTest docTest = new DocumentNodeTest((NodeTest)test); return new ItemType(docTest, processor); }
return NodeKindTest.DOCUMENT; } else { return new DocumentNodeTest((NodeTest) elementType);
return NodeKindTest.DOCUMENT; } else { return new DocumentNodeTest((NodeTest) elementType);
return NodeKindTest.DOCUMENT; } else { return new DocumentNodeTest((NodeTest)elementType);
return NodeKindTest.DOCUMENT; } else { return new DocumentNodeTest((NodeTest)elementType);
expect(Token.RPAR); nextToken(); return new DocumentNodeTest(inner);
expect(Token.RPAR); nextToken(); return new DocumentNodeTest(inner);
expect(Token.RPAR); nextToken(); return new DocumentNodeTest(inner);
expect(Token.RPAR); nextToken(); return new DocumentNodeTest(inner);