Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Need help with passing a parameter >Thread Next - Re: Need help with passing a parameter Re: Need help with passing a parameterTo: NULL Date: 10/7/2006 1:27:00 PM Thanks again Martin for your reply but I got it working now. Here is a sample for anyone looking to do the same thing. <?php $filter = $_GET[value]; ?> <script> var processor = new XSLTProcessor(); var xslt = document.implementation.createDocument("", "", null); xslt.async = false; xslt.load("file.xsl"); processor.importStylesheet(xslt); var src_doc = document.implementation.createDocument("","", null); src_doc.async = false; src_doc.load("file.xml"); processor.setParameter(null,"filter","<?PHP echo $filter ?>"); var result = processor.transformToDocument(src_doc); var xmls = new XMLSerializer(); var output = xmls.serializeToString(result); document.write(output); </script> "Martin Honnen" <mahotrash@y...> wrote in message news:%23$xqc8i6GHA.4572@T...... > > > Someone wrote: > >> I would love to do that but my hosting company does not have PHP5. > > Mozilla's XSLT processor API is described/documented here: > <http://developer.mozilla.org/en/docs/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations> > Note that it is quite different from the MSXML API as it creates document > fragment nodes allowing you to insert the result of an XSLT transformation > with appendChild into an existing document. > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
