![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: xsl:param reading a passed parameter in a browser >Thread Next - Re: xsl:param reading a passed parameter in a browser Re: xsl:param reading a passed parameter in a browserTo: NULL Date: 2/19/2007 11:38:00 PM Ok folks .. thanks for all the help. I did it this way: 1) A HTML-Page is passing a GET-parameter to a php5 page. 2) The PHP page is opening an xml-File and adds the parameter to the DOM so that it can be used by the xsl: $xml_src = 'searchdata_de.xml'; // Xpath-Querys $parent_path = "//PAGES"; $next_path = "//PAGES/PAGE"; // Create a new DOM document $dom = new DomDocument(); $dom->load($xml_src); // Find the parent node $xpath = new DomXPath($dom); // Find next Child $parent = $xpath->query($parent_path); $next = $xpath->query($next_path); // Create the new element $element = $dom->createElement('SEARCHFOR', $searchfor); // Insert the element before a Child $parent->item(0)->insertBefore($element, $next->item(0)); 3) The PHP is processing the new xml-data with an xsl and builds up the html-document: $xsl = new DomDocument; $xsl->load('search_de.xsl'); $xslt = new XsltProcessor; $xslt->importStylesheet($xsl); $transformation = $xslt->transformToXml($dom); echo $transformation; Voila! ;-) | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
