tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Tordini <>
Subject using Node variables with JSTL XML tags
Date Wed, 08 Sep 2004 08:36:51 GMT
hi all,
I'm experimenting with the JSTL XML tags. I have a org.w3c.dom.Node 
variable and I'm trying to use the JSTL with it. Something like:

<x:out select="$node/@name"/>

The odd thing is that the XPath expression is evaluated relative the 
document root, not to the specified node. The following works:

<x:out select="$node/full/path/to/node/@name"/>

I cannot find an explanation in the JSTL 1.1 spec. The only thing I 
found is in section 11.1.3:

"An XPath expression must also treat variables that resolve to 
implementations of standard DOM interfaces as representing nodes of the 
type bound to that interface by the DOM specification."

Is this behaviour by design? Is it compliant with the spec?

Thank you in advance,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message