Feature #3670
closedImplement more transform API options
100%
Description
Documentation says "Further options will be implemented in due course."
e.g. for XSLT 3.0 call-template invocation we need templateParams.
Refer to the specification for fn:transform() for ideas of what else is missing (https://www.w3.org/TR/xpath-functions-31/#func-transform) - e.g. tunnelParams; and initialMatchSelection (for apply-templates invocation).
Updated by Debbie Lockett almost 7 years ago
Note that templateParams and tunnelParams have already been implemented on the trunk branch (from 2017-10-27). Looks like the relevant code should just copied over to the 1.0 branch. JS unit tests are needed.
Something has gone awry with transform option "destination". The documentation says that the default is "application"; but looking at the code this no longer seems to be the case (i.e. if destination is not set then we don't end up down the same path [or get the same results] as when destination is "application"). Also we now use the value "native" internally; should this also be an option for users? This has always been an undertested area...
Updated by Debbie Lockett almost 7 years ago
Various JS unit tests added to test use of templateParams, and tunnelParams. Also added a number to test initialFunction and functionParams (these have been available since Saxon-JS 1.0.1, but had no JS unit tests).
Updated by Debbie Lockett almost 7 years ago
Implemented templateParams and tunnelParams on 1.0 branch (essentially copying relevant code from 2.0 branch); with some issues resolved on both branches (e.g. when the context.localParams and context.tunnelParams objects are set up using setTemplateParams method, always use 'Q{uri}local' EQName form for keys. This relates to bug 3479).
Also resolve issues with initialFunction:
-
Ensure context.localVars object values are always Arrays
-
Reset c2.tempOutputState inside event handlers (so that event handling templates can be used in stylesheets which are invoked using call function invocation).
Fix default for destination option.
Updated by Debbie Lockett over 6 years ago
- Status changed from New to Resolved
- Fix Committed on JS Branch 1.0, Trunk added
Marking this as resolved, as I think we have all the transform options we want for now. With more tests, and relevant documentation updates.
A separate issue #3755 has been raised about changes required for the API for Saxon-JS 2.0.
Updated by Debbie Lockett over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 1.1.0
Bug fix applied in the Saxon-JS 1.1.0 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page