Hi, Mansour.
Mansour <[EMAIL PROTECTED]> wrote on 2008-01-21 10:40:13 PM:
> Mansour wrote:
> > Hello:
> > I 've been looking for a way to get the XSLT element its self from the
> > ExpressionContext object. I am trying to add some methods for some
> > extensions and I have learned that these methods receive an instance
> > of ExpressionContext when called, however, I couldn't find a way or an
> > example showing how can I get the XSLT element that's being processed.
> Either the question is not very clear or I did not wait enough :P
> Ok, I need to implement the ESLT function for match. Somehting like
this:
>
> <xsl:for-each select="regexp:match('word')">
> <WORD>
> <xsl:value-of select="." />
> </WORD>
> </xsl:for-each>
>
> I have added the method match and am able to call it successfully. But
> how do I retrieve the part inside the for-each?
>
> Is there a way to access the sheet elements from the ExpressionContext ?
My apologies. I saw your question, but then responding slipped my mind.
Your example uses an extension function. Would it be possible for you to
use an extension element instead? It would seem more natural to want to
get the element and its children in that context than in the context of an
extension function.
John Gentilin has posted some utility functions [1,2] that help with
accessing and evaluating the children and attributes of an extension
element.
I hope that helps.
Thanks,
Henry
[1]
http://mail-archives.apache.org/mod_mbox/xml-xalan-j-users/200709.mbox/[EMAIL
PROTECTED]
[2]
http://mail-archives.apache.org/mod_mbox/xml-xalan-j-users/200709.mbox/[EMAIL
PROTECTED]
------------------------------------------------------------------
Henry Zongaro XSLT Processors Development
IBM SWS Toronto Lab T/L 313-6044; Phone +1 905 413-6044
mailto:[EMAIL PROTECTED]