This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Javascript in XSLT


 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've got the following event handlers in my XSLT-to-html stylesheet:

onmouseover="showSubMenu('menuGamesDrop')"
onmouseout="hideSubMenu('menuGamesDrop')"

The Games section, however, gets generated on the fly from another
file, so I actually have the following:

onmouseover="{concat('showMenu('menu', category_name,
'Drop')')}"
onmouseout="{concat('hideMenu('menu', category_name,
'Drop')')}"

Where (if they show up) ', (, and ) are all escaped when they're
needed in the event handlers. When I try this though, I get errors in
Saxon and IE javascript errors. The exact Saxon message is:

Error at div on line 34 of
http://www.ballsome.com/test/stylesheets/home.xsl:
  Error in expression concat('showMenu('menu', category_name,
'Drop')'): expecte
d ")", found "<name>"

Looks like it's replacing the entity references before it processes
the XSLT, so the single quotes are messing the concat function up. Is
there any way to fix this? Will it accept alternating single and
double quotes or something like that?

- -joeljkp

- ---------------------------------------
http://www.ballsome.com 

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPRZVHn880CLOJa2eEQKzQQCgn3sUg+H8JX2lhWxkPqSVEleQTwoAnjjZ
nehcpOiOAixH8/oOodsCfUTi
=Bl+H
-----END PGP SIGNATURE-----



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]