You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/07/09 21:11:50 UTC
DO NOT REPLY [Bug 49578] New: XPath handling only supports single
reference to variable
https://issues.apache.org/bugzilla/show_bug.cgi?id=49578
Summary: XPath handling only supports single reference to
variable
Product: Taglibs
Version: 1.2.0
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Standard Taglib
AssignedTo: dev@tomcat.apache.org
ReportedBy: jboynes@apache.org
The XPath union expression "$src/root/x | $src/root/y" is not handled correctly
as only the first set of nodes is returned. For example, the JSP
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<x:parse var="src">
<root>
<x>one</x>
<x>two</x>
<x>three</x>
<y>a</y>
<y>b</y>
</root>
</x:parse>
<x:forEach select="$src/root/x | $src/root/y">
<x:out select="."/>
</x:forEach>
only displays the "x" elements. Swapping the arms of the union operator returns
the "y" elements.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49578] XPath handling only supports single
reference to variable
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49578
Jeremy Boynes <jb...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version| |All
--- Comment #1 from Jeremy Boynes <jb...@apache.org> 2010-07-09 15:20:59 EDT ---
This appears to be because of the transformation of the expression performed in
XPathUtil#adaptParamsForXalan which takes a variable reference at the start of
the expression and maps to a context node. The documentation implies this is
because:
* Given all of this, if no context node is set for the evaluation
* of the XPath expression, one must be set so Xalan
* can successfully evaluate a JSTL XPath expression.
* (it will not work if the context node is given as a varialbe
* at the beginning of the expression)
However, Xalan is able to handle variable references like this through its
VariableStack API (or as a XPathVariableResolver when called via the JAXP API).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49578] XPath handling only supports single
reference to variable
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49578
Jeremy Boynes <jb...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Jeremy Boynes <jb...@apache.org> 2010-12-31 18:19:44 EST ---
Fixed with refactoring of XPath support in r1054175
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org