Affects Version/s: trunk
Fix Version/s: None
Environment:Operating System: other
External issue ID:38098
This patch allows xsl-functions to be called without
property name if the xsl spec 1.0 allows one optional
arg and if omitted the arg is substituted with the
property for which the expression is being evaluated.
If the PropetyParser dedects at the end of the parseArgs
method, that only one arg is missing (compared with the
expected count of args) and the function object
allows padding with the function name for which the
function is called it appends the function name to the
Changes to Function.java:
- expand the interface with the declaration for the
Changes to FunctionBase.java:
- insert a default method body for the padArgsWithPropertyName
method that returnes false which is the normal case (don't
Changes to FromParentFunction.java:
- let the padArgsWithPropertyName method return true to
indicate that filling up the number of args with the
property name for which the expression is being evaluated.
Changes to PropertyParser.java:
- call the parseArgs method with the full function object
insted only with the nbArgs counter.
- expanded the parseArgs method as mentioned in the
general describtion above.
Open issues / questions:
- should the arg created in the parseArgs method of the
PropetyParser be a NCnameProperty instead of a
StringProperty? The supplemented args are always
property names and therefore NCNames but i didn't
see an advantage and choosed the more general
StringProperty but i am not shure whats better.
- if the patch is acceptable than adjust the other functions
who also allow padding with the property name - if i find
corresponding classes :
- (from-parent) done