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

Adam Jenkins commented on XALANJ-2510:
--------------------------------------

sorry for the grumpy post, you hit me before my morning coffee :)

I asked for architectural guidance on this on the dev mailing list before doing 
this and go no assistance, except an email telling me to use extension 
functions...so I do heaps (and I mean heaps) of investigation into the codebase 
as to what is the best way to implement this (including debugging through the 
variable pre processor and indexing component) and write what looks to be the 
best solution with my limited knowledge and no guidance.  I then post a problem 
description, with a working solution, and again get told to use 
functions....then get hit by a whole bunch of what if scenarios, with no again 
no architectural guidance as to how you guys, the experts, would like me, 
someone just trying to understand a big code base with no assistance, to solve 
it...this is all incredibly frustration for a few lines of optional code that 
doesn't modify existing behaviour one bit (and I spent a _lot_ of time making 
sure that whatever solution I came up with would satisfy those criteria
 ).

very very frustrating

> 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-unsubscr...@xml.apache.org
For additional commands, e-mail: xalan-dev-h...@xml.apache.org

Reply via email to