1--TEST-- 2Test 12: Using Associative Array of Parameters 3--EXTENSIONS-- 4xsl 5--FILE-- 6<?php 7echo "Test 12: Using Associative Array of Parameters"; 8 9$dom = new domDocument; 10$dom->load(__DIR__."/xslt.xml"); 11if(!$dom) { 12 echo "Error while parsing the document\n"; 13 exit; 14} 15 16$xsl = new domDocument; 17$xsl->load(__DIR__."/xslt012.xsl"); 18if(!$xsl) { 19 echo "Error while parsing the document\n"; 20 exit; 21} 22 23$proc = new xsltprocessor; 24if(!$proc) { 25 echo "Error while making xsltprocessor object\n"; 26 exit; 27} 28 29 30$proc->importStylesheet($xsl); 31 32$parameters = Array( 33 'foo' => 'barbar', 34 'foo1' => 'test', 35 ); 36 37$proc->setParameter( "", $parameters); 38 39print "\n"; 40print $proc->transformToXml($dom); 41print "\n"; 42?> 43--EXPECT-- 44Test 12: Using Associative Array of Parameters 45<?xml version="1.0" encoding="iso-8859-1"?> 46<html><body>barbar 47test 48a1 b1 c1 <br/> 49a2 c2 <br/> 50�3 b3 c3 <br/> 51</body></html> 52