I thought you might like the transformer tag :-)

Thanks for the clarification - I understand now. Yes that code should work
fine against the current XTags CVS image or against tonights nightly build.

Currently the XML tags in JSTL don't support this functionality either.

Shawn, do you want to apply a similar patch to the XML tags in JSTL, to
allow a parameter value to be an Object? I'll do it if you like? Basically
Transformer.setParameter(String name, Object value) can take a value of
Object rather than just a String. It would need a change to the param tag in
JSTL to support supplying a value...

<x:transform ...>
    <x:param name="foo" value="$bar"/>
</x:transform>

James
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 23, 2001 10:30 AM
Subject: Antwort: Re: XTags: Passing non String Parameters to a Stylesheet?


> Hi James,
>
> thanks for quick response and of course the patch!
>
> We currently use the possibility of using arbitrary Java Objects in the
> stylesheet for various reasons. One is for example that for the session
> handling we did not want to use Cookies, so we had to use url rewriting.
> The result is that all links that are generated in the stylesheet have to
> be encoded of the actual response object in order to append the session
> id:
>
> <xsl:param name="response"/>
>
> ......
> <a>
>         <xsl:attribute name="href">
>                 <xsl:value-of select="java:encodeURL($response,
> 'a_link')"/>
> ....
>
> Thanks also for the JSTL hint. I haven't recognized it yet. Especially the
transformer tag seems
> to be valuable for me because I have exactly the problem of using the same
> stylesheets over and over again.
>
> Regards -- Tobias
>
>
>
>
>
>
> "James Strachan" <[EMAIL PROTECTED]>
> 23.11.2001 11:01
> Bitte antworten an "Tag Libraries Users List"
>
>
>         An:     "Tag Libraries Users List"
<[EMAIL PROTECTED]>
>         Kopie:
>         Thema:  Re: XTags: Passing non String Parameters to a Stylesheet?
>
> Hi Tobias
>
> The parameters values were Stirngs. I've just patched the code so that any
> object can be passed in to the XSLT engine. This fix will make it into the
> next nightly build.
>
> Though whether the XSLT engine is capable of using other types of
> parameters, such as HttpServletResponse, is questionable. Certainly
> handling
> DOM Nodes or Numbers is possible. In what way to you want the XSLT engine
> to
> use the HttpServletResponse?
>
> BTW the standard tag library, JSTL, now has XML tags which are based
> heavily
> on XTags and will ultimately will supercede them. It could well be worth
> taking a look at them; the original XTags design has been refined somewhat
> in the JSTL XML tags.
>
> http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
>
> James
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, November 23, 2001 8:31 AM
> Subject: XTags: Passing non String Parameters to a Stylesheet?
>
>
> > Hi,
> >
> > is there a way with XTags to pass non String values as parameters to a
> > stylesheet, e.g. the response object to encode generated links?
> >
> > <xtags:style xsl="a.xsl" xml="b.xsl" >
> >         <xtags:param name="response"><%=response%></xtags:param> does
> not
> > work
> >         <xtags:param name="response" value="{$response}"/> does not work
> > either
> >
> >         <xtags:param name="response" value="{$response}"
> > type="javax.servlet.http.HttpServletResponse"/> would be needed?
> > </xtags:style>
> >
> >
> > Thanks -- Tobias
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to