Hello Arnab,

Add the following code under html head head tag in xsl stylesheet

<script language="JavaScript">
           <![CDATA[
           function image() {
             window.open(']]><xsl:value-of select="samples/link"/><![CDATA[');
           }
           ]]>
</script>

In the above case it it uses the value from input xml file like

<samples>
<link>http://www.apache.com</link>
</samples>

If you have the value in your variable or as a parameter modify this
line appropriatly

Next for the href link use
<a href="javascript:image()">The Apache Software Foundation.</a>

Thats it and you should be thru.

Sanket

On 3/24/06, Luca Morandini <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> >
> >         I am trying to open a new window in xsl which is called within a
> > pipeline in sitemap.For the purpose I am wrinting a javascript function
> > within xsl.but i am getting an error message that the positioning of the
> > <xsl:script>is wrong.
> > Is it that cocoon does not recgnoize the use of the usage of xsl:script
> > lang="javascript" or is there something which I am missing.
> > Can anyone put some light on the issue?
>
> I'm not sure I got what you're trying to do, but:
>
> 1) Cocoon processes XSLT on the server side, but you are trying to open
> a window on the client side; hence, this cannot be done by XSLT
> processing alone.
> 2) The "xsl:script" element is an "hook" provided in XSLT 1.1 for
> processor-specific extensions, hence, something that works under Xalan
> may not work under MSXML.
>
> Anyway, why don't you just embed a "window.open()" statement in an HTML
> "script" element ?
>
> Regards,
>
> --------------------
>     Luca Morandini
> www.lucamorandini.it
> --------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to