reading over my last paragraph, it's not clear what I meant, so here's a second attempt. The current 3-19 nightly of XPathUtil.valueOf is below:
public String valueOf(Node n, String xpath) throws SAXPathException { staticInit(); XPath xp = new XPath(xpath); return xp.valueOf(getLocalContext(n)); } when it calls return, it the result of getLocalContext(node) to XPath.valueOf(). when I output that result, I get zero length string. the source for getLocalContext(node) is below. private Context getLocalContext(Node n) { // set up instance-specific contexts VariableContext vc = new JstlVariableContext(); ContextSupport cs = new ContextSupport(nc, fc, vc, dn); Context c = new Context(cs); List l = new ArrayList(1); l.add(n); c.setNodeSet(l); return c; } an instance of JstlVariableContext is passed to the constructor of ContextSupport, but I don't see where JstlVariableContext.getVariableValue() is called. Within getLocalContext, should it check to make sure context was created correctly when it does Context c = new Context(cs)? when I output the result of the hsr.getHeader(localName), it never reaches that chunk of code in getVariableValue(). else if (namespace.equals(HEADER_NS_URL)) { HttpServletRequest hsr = (HttpServletRequest) pageContext.getRequest(); return hsr.getHeader(localName); thanks. peter lin peter lin > Should valueOf(node,string) check the result of > xp.valueOf(getLocalContext(n)) and call getLocalContext? I'm don't > completely understand XPathUtil. Any tips are greatly appreciated. > > peter lin > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>