We have the following usage of text() function in XPath in our Gel Scripts. We notice that it works in version 15.8.1 but not in 15.9.2.
Example:
<gel:script
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary">
<gel:parse var="varGroups">
<groups>
<group code="DS23">SWAT Team</group>
</groups>
</gel:parse>
<gel:set asString="true" select="$varGroups/groups/group/@code/text()" var="groupCode"/>
<gel:log> Code: ${groupCode} </gel:log>
</gel:script>
Wrong usage of text() in XPath.
Version: 15.9.2
This usage might have worked in a previous version of the product. However, since 15.9.2, a corrected version such as the one below would have to be used. The correct usage is also documented in gel:set Setting XML Document Values
Correct Usage:
<gel:script
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary">
<gel:parse var="varGroups">
<groups>
<group code="DS23">SWAT Team</group>
</groups>
</gel:parse>
<gel:set asString="true" select="$varGroups/groups/group/@code" var="groupCode"/>
<gel:log> Code: ${groupCode} </gel:log>
</gel:script>
The JAXEN library has been upgraded to 1.2.0. The wrong usage of text() in XPath does not work with this upgraded library and documented in our Change & Impact Guide and gel:set Setting XML Document Values