XML_XSLT_Wrapper
[ class tree: XML_XSLT_Wrapper ] [ index: XML_XSLT_Wrapper ] [ all elements ]

Source for file test.php

Documentation is available at test.php

  1. <?php
  2. ini_set('include_path''.:/usr/local/lib/php');
  3. //require_once 'System/Command.php';
  4. require_once 'XSLT/XSLT_Wrapper.php';
  5.  
  6. // test console
  7.  
  8. //define('XSLT_XT_CMD','~/xslt_wrapper/xt-20020428a-src/demo/xt.sh');
  9.  
  10. $xml '<?xml version="1.0"?>
  11.  
  12. <items>
  13.   <item>
  14.     this is 1
  15.   </item>
  16.   <item>
  17.     this is 2
  18.   </item>
  19.   <item>
  20.     this is 3
  21.   </item>
  22.   <item>
  23.     this is 4
  24.   </item>
  25.   <item>
  26.     this is 5
  27.   </item>
  28. </items>
  29. ';
  30.  
  31. $xslt = XSLT_Wrapper::XSLT_Wrapper(XSLT_DOM);
  32. $xslt->setXML($xmlPEAR_XSLT_MODE_STRING);
  33. $xslt->setXSL('table.xsl'PEAR_XSLT_MODE_FILE);
  34. $xslt->initXML();
  35. $xslt->initXSL();
  36. $xslt->setParam('numberofcols'4);
  37. $xslt->process();
  38. $xslt_result $xslt->ResultDumpOut();
  39.  
  40. $options = array();
  41.  
  42. $options['xml']          $xml;
  43. $options['outputfolder''./outputbatch2/';
  44. $options['xslt_files']   = array(
  45.                                 array(
  46.                                     'filepath'=>'table.xsl',
  47.                                     'outputfile'=>'t1'
  48.                                 ),
  49.                                 array(
  50.                                     'filepath'=>'table2.xsl',
  51.                                     'outputfile'=>'t2'
  52.                                 )
  53.                             );
  54.  
  55. $xslt->batchXML($options);
  56.  
  57. $options['xslt']      './samples/table.xsl';
  58. $options['xml_datas'= array(
  59.                             array(
  60.                                 'data'=>'items2.xml',
  61.                                 'outputfile'=>'t1'
  62.                             ),
  63.                             array(
  64.                                 'data'=>'items2.xml',
  65.                                 'outputfile'=>'t2'
  66.                             )
  67.                         );
  68.  
  69. $options['outputfolder''./outputbatch4312/';
  70.  
  71. $xslt->batchXSL($options);
  72. ?>

Documentation generated on Mon, 11 Mar 2019 15:28:09 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.