Re: RES: [xsl] Hide and show rows

Subject: Re: RES: [xsl] Hide and show rows
From: "Manfred Staudinger" <manfred.staudinger@xxxxxxxxx>
Date: Sun, 16 Sep 2007 18:44:44 +0200
Taking your input xml,
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
> <?xml-stylesheet type='text/xsl' href='Log.xsl'?>
> <root>
>   <Log Category="2" Level="1">
>     <Text>Initializing Log system.</Text>
>   </Log>
>   <Log Category="3" Level="1">
>     <Text>Initializing MySQL database system...</Text>
>     <Action>
>       <Text>'/etc/Helper.MySQL' is the path to the config file.</Text>
>     </Action>
>   </Log>
> </root>
you start (by PI) a xsl transformation client-side and get some html.
This takes place _before_ any javascript is processed! Now I would
like you to specify the output (in html code) you want to have using
your sample input, including any javascript invocation (the prototype
html, see below)!

> I know that I could parse all rows one by one with a onload event, but I
> wouldn't like that
> I am newbie in xsl, so I though on using a counter variable that would name
> each row, then with javascript I would know what the user clicked with a
> onclick event, but you can't increment or event touch a variable after it is
> defined
> Any help please? How would you do this?
>From the _html_ you should figure out what you need in order to make
your javascript working: you want a parameter to be passed to a
javascript function? this parameter should be the value of an
id-attribute for one of the html elements?
This means in the first step you have a prototype html page and can
actually test whether the javascript is doing what you want it to do.
Only _after_ this you take the second step and ask how to generate
such a html from your xml input.
Testing your xsl should _not_ be done using the browser, its a pain.
Do you a favor and use Saxon 6 for example.

Hope this helps,

Current Thread