You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Shustef, Eugene" <Eu...@westgroup.com> on 2001/03/27 20:33:21 UTC
using extension functions inside stylesheets to get NodeSet back
Is there a way to call an extension function, and have it return a nodeset
back without having that nodeset turned into a string?
( example
In stylesheet:
<encoded.block>
call: myprocess:getEncodedNodeSet(bar)
</encoded.block>
and get in the output:
<encoded.block>
<encoded-bar>
<blah/>
<blah/>
</encoded-bar>
</encoded.block>
)
Thanks,
-- Eugene
Re: using extension functions inside stylesheets to get NodeSet back
Posted by Gary L Peskin <ga...@firstech.com>.
"Shustef, Eugene" wrote:
>
> Is there a way to call an extension function, and have it return a nodeset
> back without having that nodeset turned into a string?
>
> ( example
>
> In stylesheet:
> <encoded.block>
> call: myprocess:getEncodedNodeSet(bar)
> </encoded.block>
>
> and get in the output:
>
> <encoded.block>
> <encoded-bar>
> <blah/>
> <blah/>
> </encoded-bar>
> </encoded.block>
> )
Yes, assuming your using XalanJ2. I don't know about XalanC. See the
Extension documentation and look at the supplied extensions in the
org.apache.xalan.lib package.
Gary
Re: using extension functions inside stylesheets to get NodeSet back
Posted by John Gentilin <jo...@eyecatching.com>.
The SQL Extensions may be a good example, just look at XConnection
and XStatement. They return a NodeIterator though and not a node set,
not sure if that is significant.
You XSL would be
<encoded-block>
<copy-of select="myprocess:getEncodedNodeIterator(bar)" />
</encoded-block>
"Shustef, Eugene" wrote:
> Is there a way to call an extension function, and have it return a nodeset
> back without having that nodeset turned into a string?
>
> ( example
>
> In stylesheet:
> <encoded.block>
> call: myprocess:getEncodedNodeSet(bar)
> </encoded.block>
>
> and get in the output:
>
> <encoded.block>
> <encoded-bar>
> <blah/>
> <blah/>
> </encoded-bar>
> </encoded.block>
> )
>
> Thanks,
>
> -- Eugene