xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Zongaro (JIRA)" <xalan-...@xml.apache.org>
Subject [jira] Commented: (XALANJ-2510) Ability to set non tree fragment variable using an extension element (PATCH SUPPLIED)
Date Mon, 23 Nov 2009 19:53:39 GMT

    [ https://issues.apache.org/jira/browse/XALANJ-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781586#action_12781586

Henry Zongaro commented on XALANJ-2510:

Sorry - I was just getting caught up on the e-mail thread associated with this.  You wrote,
"nope, they can't...trust me :)

It's a very advanced extension library with significant nested structure...to represent it
as a sequence of nested function calls would be too complex and difficult to read/maintain...if
it could be done at all.

The example I gave was an extremely simple use case to get across what I want to do, rather
than get bogged down in the particulars of each use case.  I understand the use of functions,
my extension library has a whole bunch of extension functions (I think it's up to about 30)...but
also has about 40 extension elements for structures that are just too complex to be represented
as extension functions.  Some of these extension elements have return values that don't suit
being turned into a node set."

> Ability to set non tree fragment variable using an extension element (PATCH SUPPLIED)
> -------------------------------------------------------------------------------------
>                 Key: XALANJ-2510
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2510
>             Project: XalanJ2
>          Issue Type: Improvement
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.
 Anybody can view the issue.) 
>          Components: Xalan-extensions
>    Affects Versions: The Latest Development Code
>            Reporter: Adam Jenkins
>             Fix For: The Latest Development Code
>         Attachments: XALANJ-2510.patch
> When using extension elements, there is no way to set a non XRTreeFrag related variable.
> For example, say you have:
> <xsl:variable name="myvar">
>    <my:extension someAttribute="somevalue"/>
> </xsl:variable>
> If my:extension wants to set a tree fragment, string or nodeset into myvar, that's not
a problem, however if it wants to set a java object, currently there is no mechanism for that
(any java object passed either returned from the method or passed to XSLProcessorContext.outputToResultTree
is toString()'ed before being passed back to the ElemVariable.getValue() method).
> The proposed change (patch supplied) is to supply an optional variable on ElemVariable.java
whereby child extension elements can call up to their parent and set an XPath to be evaluated
after the extension element has finished processing.
> This requires only very minor modification to the ElemVariable.getValue method to check
this variable.
> This also ensures that this is optional functionality and will not affect that basic
Xalan processing.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org

View raw message