Subject:XSLT help with linking Author:thomas furst Date:30 Nov 2007 02:20 PM Originally Posted: 30 Nov 2007 02:19 PM
I am relatively new to using XSLT. Following is an example of the xml I have to start with.
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="symptom.xsl"?>
<fault-knowledge-base model-code='S92A'>
I am trying to create a link that will, when you click on the symptom text, will show a list of the corresponding corrective actions in an inline frame.
this is the simple stylesheet I have gotten so far:
Subject:XSLT help with linking Author:James Durning Date:03 Dec 2007 09:50 AM
The way you have it set up at the moment, you'd probably need a javascript solution involving show/hide on elements.
Clicking on the link calls a onclick_ method which runs a javascript function, passing a single argument, say ID.
Use a getElementsByTagName to get all of the elements.
Then run a for-each on the NodeList.
If it has the right value in it's attribute, set it to show. Otherwise, set it to hide.
(Note I'm not a javascript expert, so don't know the exact code for this solution. Suggest googling for it.)