Topic: pass javascript variables to xsl:param Pages that link to <a href="https://ozoneasylum.com/backlink?for=22322" title="Pages that link to Topic: pass javascript variables to xsl:param" rel="nofollow" >Topic: pass javascript variables to xsl:param\

 
Author Thread
irowake
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jun 2004

IP logged posted posted 06-25-2004 10:26 Edit Quote

Hi,

I have to pass javascript variables to xsl:param elements.
The purpose of my xsl is to select certain elements of my xml-tree. The nodename of the selected element is passed to the xml by URL-parameters. I can read the URL-parameters with javascript. But I now have to pass them the xsl:param-element so that I can use the param like this:

code:
<xsl:template match="Chapter[@id]">

<xsl:if test="@id='$URL-param'">
<TR>
<TD>Chapter found</TD>
</TR>
</xsl:if>
</xsl:template>


How can I do this? Thanx in advance.

Greetz,
Karen

Edit TP: added code tags and removed slimies

(Edited by Tyberius Prime on 06-25-2004 12:17)

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

IP logged posted posted 06-25-2004 12:26 Edit Quote

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

irowake
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jun 2004

IP logged posted posted 06-28-2004 14:35 Edit Quote

I tried to use the example from http://www.biglist.com/lists/xsl-list/archives/200107/msg00002.html but it didn't work. I can't figure it out how to use the piece of code. Do you have to copy it in a new HTML or do wyou have to copy it to your xsl? I don't know. I tried both, but none worked. The code is valid, but is seems to do nothing.

I am now trying to use the example from http://www.topxml.com/xsl/tutorials/intro/xsl10.asp
My code complains about implements-prefix. I know I need to have a namespace, but how can I make one? Or are there existing namespaces I can use? I am a newbie in javascript.

Greetz,
Karen

(Edited by irowake on 06-28-2004 14:36)

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

IP logged posted posted 06-28-2004 16:56 Edit Quote

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu