You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Gary L Peskin <ga...@firstech.com> on 2001/05/09 17:38:32 UTC

Re: XSLT Extensions

Hi, Jason --

On number 1, can you send a copy of your code, XML, and XSLT to
xalan-dev (which is where Xalan questions belong)?  I'll play around
with it but I don't have too much time at the moment but I'll try.  Your
sample will save me some time in trying to recreate what you're trying
to do.

On number 2, is the String being returned from an extension function or
an extension element?  If from a function, is that being called from an
xsl:value-of element or how?  Additional details, please.

Thanks,
Gary

jason heddings wrote:
> 
> Hello!
> 
> I have two questions regarding XSL Extensions in Xalan...
> 
> I have created my own extension element (xmlns=foo -- of course).  That
> element has an instruction called "bar" and takes some attributes:
> <foo:bar att1="val1" ... />
> 
> That all works great, but here's my question:  I want to be able to
> process all the children in the element --
> <foo:bar att1="val1">
>   <xsl:value-of select="." />
> </foo:bar>
> 
> But rather than send the output to the result tree, I want to hold onto
> it and allow foo:bar to process it.  I've tried using a
> ByteArrayOutputStream along with a StreamResult to get what I thought
> would be an appropriate ContentHandler, but nothing is sent to the
> ByteArrayOutputStream when I call executeChildTemplates.
> 
> My second question is:
> 
> I have an extension that returns a String.  If that string contains HTML
> (or any reserved XML characters), they are escaped before going to the
> result tree.  I'd like to send it straight to the output like
> <xsl:value-of ... disable-output-escaping="yes" /> does.
> 
> So that's a lot of me babbling...  Anyone who can make sense of it and
> solve my problem has my upmost respect :)  Sorry, no real prizes...
> 
> --jah
> 
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       \\\|///                 Jason Heddings             ((
>      \\ ~ ~ //                303.272.5166 (x75166)    C|~~|
>      (/ @ @ /)                Jason.Heddings@Sun.COM    `__'
>  ~~oOOo~(_)~oOOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~