XSLTProcessor
PHP Manual

XSLTProcessor::transformToUri

(PHP 5)

XSLTProcessor::transformToUriتبدیل به URI

Description

int XSLTProcessor::transformToURI ( DOMDocument $doc , string $uri )

تبدیل گره منبع به URI نشاندهنده stylesheet داده شده توسط XSLTProcessor::importStylesheet().

Parameters

doc

سند تبدیل شده.

uri

Return Values

بازگرداندن تعداد بایت‌های نوشته شده یا FALSE اگر خطا رخ داده باشد.

Examples

Example #1 تبدیل به فایل HTML

<?php

// Load the XML source
$xml = new DOMDocument;
$xml->load('collection.xml');

$xsl = new DOMDocument;
$xsl->load('collection.xsl');

// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules

$proc->transformToURI($xml'file:///tmp/out.html');

?>

See Also


XSLTProcessor
PHP Manual