public URI getNodeUri() throws XQException {
if (item instanceof NodeInfo) {
try {
return new URI(((NodeInfo)item).getSystemId());
} catch (URISyntaxException e) {
throw new XQException("System ID of node is not a valid URI");
}
}
throw new XQException("Item is not a node, or is closed");
}