case NAMESPACE_URI:
String uri = node.getURI();
s = (uri==null ? "" : uri);
// null should no longer be returned, but the spec has changed, so it's
// better to be defensive
return new AnyURIValue(s);
case GENERATE_ID:
FastStringBuffer buffer = new FastStringBuffer(FastStringBuffer.TINY);
node.generateId(buffer);
buffer.condense();
return new StringValue(buffer);
case DOCUMENT_URI:
// If the node is in the document pool, get the URI under which it is registered.
// Otherwise, return its systemId.
if (node.getNodeKind() == Type.DOCUMENT) {
DocumentPool pool = c.getController().getDocumentPool();
String docURI = pool.getDocumentURI(node);
if (docURI == null) {
docURI = node.getSystemId();
}
if (docURI == null) {
return null;
} else if ("".equals(docURI)) {
return null;
} else {
return new AnyURIValue(docURI);
}
} else {
return null;
}
case NODE_NAME: