View Single Post
  #2 (permalink)  
Old November 1st, 2006, 07:18 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,438, Level: 59
Points: 18,438, Level: 59 Points: 18,438, Level: 59 Points: 18,438, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,954
Thanks: 0
Thanked 290 Times in 285 Posts
Default

You seem to be confused about the relationship of the XSLT to the Javascript.

You're invoking the transformation, I think, via the xml-stylesheet processing instruction. That doesn't supply any parameters to the XSLT. The XSLT runs, and it generates an HTML page, and the HTML page contains some Javascript. I'm not sure if this Javascript ever gets activated - I don't see anything in the HTML that triggers it - but even if it does, it obviously can't affect the transformation that's already taken place.

If you want to invoke a transformation with parameters, the approach is to write an HTML page which the user invokes; this contains some Javascript which is activated e.g. onLoad; this Javascript calls the transformation engine to do the transformation and update the display. You can't put the invoking program in its own output.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote