Re: [xsl] javascript, xsl and xml

Subject: Re: [xsl] javascript, xsl and xml
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 6 Aug 2004 12:40:18 +0100
> Onclicking the image to call the function I get

as always it's better to debug by looking at the generated markup rather
than viewing/interacting with the result in a browser.

If the generated markup is what you hoped to generate but it doesn't
work, your problem isn't an XSLT one:-) If on the other hand it isn't
what you hoped then it's easier if you just show what you hoped to
generate and what you did generate (saves us thinking about javascript,
which puts us off lunch: confusing language that: did you know it allows
you to update the value of variables in place??? strange...)

You didn't really show enough to help, in particular you seem to be
putting some markup into an onclick attribute, but you are getting it
from a source attribute:
how did it get into that val attribute?

Also are you using the html or xml output method, the behaviour of
markup in attribute values is different in the two cases and finally, 
even though I said that it's the wrong way to debug this, when you do
interact with the page and click on it are you using an html system or
an xhtml one, again the markup required in the two cases is rather

especially if you do finally want this file to be some kind of hybrid
xhtml/html document you might find it easier to avoid the distinctions
of quoting or not attribute values and just have a simple javascript
call to a function defined in a script element, it's easier to control
things in element content.


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread