Belegkarnil Posted January 18, 2012 Share Posted January 18, 2012 Hi !I customize a Web Framework to use XSL stylesheet on XML and generate HTML 5.I want to report the process (XSL transformation) on the client-side if the client support XSLT.But if the client do not support this operation, I want to process on the server-side and send the generated HTML 5.My problem is : the Javascript function I call on the page works on XML content (ot HTML 5 if the browser does not support XSLT).But I would like to use Javascript on HTML 5 for both cases.So how can I access to the rendered content ? Not on the source content ?Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted January 18, 2012 Share Posted January 18, 2012 If you're going to write the code to generate the HTML5 content anyway, why do the additional work of sending XML if the client supports it? Why not always generate and send the HTML5, and have a single set of Javascript? Link to comment Share on other sites More sharing options...
Belegkarnil Posted January 19, 2012 Author Share Posted January 19, 2012 If the client support Javascript, I can modify the HTML content (AJAX) but If the client does not support Javascript ... Link to comment Share on other sites More sharing options...
justsomeguy Posted January 19, 2012 Share Posted January 19, 2012 So you're targeting browsers that don't support Javascript but do support XML/XSLT transformations? I'm confused though, your question was about how to get Javascript to run on the transformed content, correct? Link to comment Share on other sites More sharing options...
Belegkarnil Posted January 19, 2012 Author Share Posted January 19, 2012 I want to support all cases :1 : with JS, with XSLT2 : with JS, without XSLT3 :without JS, with XSLT4 :without JS, without XSLTand yes, I want to run JS on transformed content to create only one JS code for cases 1 and 2. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 19, 2012 Share Posted January 19, 2012 Unfortunately I don't think I can answer your question, I tend to stay away from XML when I can. Others may be able to provide help. Link to comment Share on other sites More sharing options...
Belegkarnil Posted January 19, 2012 Author Share Posted January 19, 2012 That's what I thought from my internet search but I want to be sure.Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.