use of org.xmldb.api.base.ResourceSet in project exist by eXist-db.
the class XQueryFunctionsTest method localName_contextItem.
@Test
public void localName_contextItem() throws XPathException, XMLDBException {
final ResourceSet result = existEmbeddedServer.executeQuery("let $a := <a><b/></a>" + "return $a/b/fn:local-name()");
final String r = (String) result.getResource(0).getContent();
assertEquals("b", r);
}
use of org.xmldb.api.base.ResourceSet in project exist by eXist-db.
the class XQueryFunctionsTest method noeName_empty.
@Test
public void noeName_empty() throws XPathException, XMLDBException {
final ResourceSet result = existEmbeddedServer.executeQuery("fn:node-name(())");
assertEquals(0, result.getSize());
}
use of org.xmldb.api.base.ResourceSet in project exist by eXist-db.
the class XQueryFunctionsTest method nodeName_emptyText.
@Test
public void nodeName_emptyText() throws XPathException, XMLDBException {
final ResourceSet result = existEmbeddedServer.executeQuery("<a>b</a>/fn:node-name(text())");
assertEquals(0, result.getSize());
}
use of org.xmldb.api.base.ResourceSet in project exist by eXist-db.
the class XQueryFunctionsTest method localName_contextItem_empty.
@Test
public void localName_contextItem_empty() throws XPathException, XMLDBException {
final ResourceSet result = existEmbeddedServer.executeQuery("let $a := <a><b/></a>" + "return $a/b/c/fn:local-name()");
final String r = (String) result.getResource(0).getContent();
assertEquals("", r);
}
use of org.xmldb.api.base.ResourceSet in project exist by eXist-db.
the class XQueryFunctionsTest method documentURI.
@Test
public void documentURI() throws XMLDBException {
String query = "let $a := <a><b>-1</b><b>-2</b></a> " + "return $a/b[empty(document-uri(.))]";
ResourceSet result = existEmbeddedServer.executeQuery(query);
assertEquals(2, result.getSize());
}
Aggregations