} else if (hrefValue.startsWith("#")) {
hrefValue = hrefValue.substring(1);
targetNode = ((Document)controller.getTargetNode()).getElementById(hrefValue); // com.google.gwt.dom.client.Document.get().getElementById(hrefValue);
} else if (hrefValue.startsWith("?select=")) {
String select = hrefValue.substring(8);
AbstractStaticContext env = new AbstractStaticContext() {
public String getURIForPrefix(String prefix) throws XPathException {
return null;
}
public Expression bindVariable(StructuredQName qName) throws XPathException {
return null;
}
public NamespaceResolver getNamespaceResolver() {
return null;
}
//override getFunctionLibrary to return that loaded for the prepared stylesheet
public FunctionLibrary getFunctionLibrary() {
return controller.getPreparedStylesheet().getFunctionLibrary();
}
};
ExpressionVisitor visitor = new ExpressionVisitor();
visitor.setConfiguration(context.getConfiguration());
visitor.setExecutable(new Executable(context.getConfiguration()));
visitor.setStaticContext(env);
env.setConfiguration(context.getConfiguration());
Container container = (StyleElement)getSourceLocator();
Expression expr = null;
try {
expr = ExpressionTool.make(select, env, container, 0, Token.EOF, getSourceLocator());
} catch (Exception e) {