Warning: file_put_contents(): Only -1 of 76 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
XSLTProcessor::transformToDoc XSLTProcessor::transformToXML XSL PHP Manual XSLTProcessor::transformToURI (No version information available, might be only in CVS) — URI に変換する 説明 XSLT...
Forum und email

XSLTProcessor::transformToURI

(No version information available, might be only in CVS)

XSLTProcessor::transformToURI — URI に変換する

説明

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

XSLTProcessor::importStylesheet メソッドで与えられたスタイルシートを適用し、 ソースノードを URI に変換します。

パラメータ

doc

変換される文章を指定します。 The transformed document.

uri

返り値

書き込まれたバイト数。エラーが発生した場合は FALSE

Example#1 HTML ファイルへの変換

<?php

// XML ソースをロードする
$xml = new DOMDocument;
$xml->load('collection.xml');

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

// 変換の設定を行う
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // XSL ルールを適用する

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

?>