Honolulu Release, Istanbul Release
Given a model containing data like below
currently cpsPath can be used to execute a query with a cpsPath of '//category' which is interpreted as xPath "ends-with the string 'category'"
and it will return both above data elements as the both end in 'category'. Also '//ry' would return the same result
to prevent ambiguity we recommended and have written test with '///category' looking for xPaths that end in '/category' and do NOT match '/subcategory'
However in XPath preceding '/' is implied and '//category' should only match the whole node identifier. So '//category' will only match '/bookstore/category' and NOT '/bookstore/category/subcategory'. ''//ry' wil match nothing!
using three slashes ('///category') is invalid syntax in xPath
- When creating the target-string used by ends-with expression in the DB query, prefix it with a singel '/' to get the required results
- (optional) Before creating the target -string check if it starts with a '/' and if so throw an exception that the cpsPath expression is invalid
|120563,1||Fix "ends-with" query syntax to conform with xPath definition||master||cps||Status: MERGED||+2||+1|