Details
-
Improvement
-
Status: Closed
-
Resolution: Fixed
-
2.5
-
None
-
None
-
Operating System: other
Platform: Other
-
38098
Description
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.
Description:
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
arg list.
Changes to Function.java:
- expand the interface with the declaration for the
padArgsWithPropertyName method.
Changes to FunctionBase.java:
- insert a default method body for the padArgsWithPropertyName
method that returnes false which is the normal case (don't
allow padding).
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.
Todo:
- if the patch is acceptable than adjust the other functions
who also allow padding with the property name - if i find
corresponding classes :
- system-font
- inherited-property-value
- (from-parent) done
- from-nearest-specified-value
- from-table-column
- merge-property-values