downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<xslt_backend_versionxslt_errno>
Last updated: Thu, 26 Jun 2008

xslt_create

(PHP 4 >= 4.0.3)

xslt_create — Create a new XSLT processor

Description

resource xslt_create ( void )

Create and return a new XSLT processor resource for manipulation by the other XSLT functions.

Return Values

Returns an XSLT processor link identifier on success, or FALSE on error.

Examples

Example #1 xslt_create() example

<?php
function xml2html($xmldata, $xsl)
{
  
/* $xmldata -> your XML */
   /* $xsl -> XSLT file */

  
$path = 'include';
  
$arguments = array('/_xml' => $xmldata);
  
$xsltproc = xslt_create();
  
xslt_set_encoding($xsltproc, 'ISO-8859-1');
  
$html =
      
xslt_process($xsltproc, 'arg:/_xml', "$path/$xsl", NULL, $arguments);

   if (empty(
$html)) {
       die(
'XSLT processing error: '. xslt_error($xsltproc));
   }
  
xslt_free($xsltproc);
   return
$html;
}
?>

See Also



add a noteadd a note User Contributed Notes
Create a new XSLT processor
There are no user contributed notes for this page.




<xslt_backend_versionxslt_errno>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs