• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

about XML scripting-URGENT

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai all,
i want to invoke a function on onclick of a event through XSL.
I wanted to sort using XSL dynamically , the parameter for sorting will be provuded on ONCLICK EVENT. is there a way to do in XSL bcos the W3c standard does not support this but microsoft has his own specific tags to do it like
xsl:script and xsl:eval but w3c does not recommend this
please help me out
i badly need this for my project
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as my knolwge goes, you cannot call JavaScript function from XSLT without leaving XSL 1.0 spec. �Script� element was proposed in 1.1 specification: http://www.w3.org/TR/xslt11/
14.4 Defining Extension Functions
but I suppose we will have to wait a little before this specification will be supported.
However, here is a similar problem:
�I'am trying to sort the data when I click on the header's names and I would let the data(information's) to display in right order(alphabeta), I have tryied to use Java script but I would prefer to use xsl if it is possible.�
an answer given is a JavaScript which perform sorting. I am afraid you will have to register with ExpertExchange to view it.
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunilkumar.
How do you get hold of the onclick event? Through JavaScript?
 
sunilkumar ssuparasmul
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai,
i am not using JAVSCRipt , the problem ccan be solved by xsl:script tag which is specific to microsoft bcos w3c std does not state this.and apart from it there are lots of tAGS WHICH IS SPECIFIC TO ms. wat i wanted toi know is it possible to do it in a way as per w3c norm.
hopw i am clear. oif u still have doubts plz get in touch
 
Mapraputa Is
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To check if I understand your requirements:
1. you will have your XML transformed into HTML
2. user will see HTML in his/her browser and should be able to choose parameters for sorting dynamically. Say, it will be a table and user can sort it by clicking on column's header.
3. column's header (whether link, or button, or something else) will be defined with ONCLICK = �<some code for sorting>� attribute.
Your question is how you write this <some code for sorting>, which will supposedly call XSL for sorting?
My understanding is: after XML -> HTML transformation is performed, browser is unaware that a source of HTML was XML/XSLT gang, it is just HTML, like any other �pure HTML� file. That means you cannot call XSL functions directly, you have to use some intermediate software layer, like
Cocoon.
However, if somebody knows a way to call XSLT processing from resulting HTML, please, correct me
[This message has been edited by Mapraputa Is (edited March 16, 2001).]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!