DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38098>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38098

           Summary: [patch] allow some xsl-function calls with omitted args
           Product: Fop
           Version: 1.0dev
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: fo tree
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: [EMAIL PROTECTED]


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

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to