Affects Version/s: 1.1 Final
Fix Version/s: None
Operating System: Windows XP
It is not clear in the doc comments how to call a function in such a way that
certain parameters are evaluated as XPath expressions before being passed to
For example, in the PackageFunctions doc comments, it gives the example:
"util:substring('foo', 1, 2)" is equivalent to "foo".substring(1, 2)
which is not an especially useful example, as both are inefficient equivalents
of the expression "fo".
A more interesting example involve an expression like:
"util:substring('person/name/middleName', 1, 1)"
which could be used to get the middle initial of a person. The problem is how
to indicate that this should be context.getJXPathContext().getValue
("person/name/middleName").substring(1, 1) instead
of "person/name/middleName".substring(1, 1).
Without the facility to indicate that some parameters are XPath expressions,
existing methods cannot be used without writing wrapper methods to evaluate
the XPath expressions.
If such a facility already exists, the doc comments of PackageFunctions, etc.
should be updated to describe it.