« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 14 for importStyleSheet (0.001 sec.)
XSLTProcessor::importStylesheet — スタイルシートを取り込む | PHP 8.3 12743
XSLTProcessor::importStylesheet (PHP 5, PHP 7, PHP 8) XSLTProcessor::importStylesheet — スタイルシートを取り込む 説明 public function XSLTProcessor::importStylesheet ( object $stylesheet ): bool このメソッドは XSLTProcessor に変換のためのス ...
https://man.mtool.work/php/8.3/xsltprocessor.importstylesheet.html
XSLTProcessor::transformToUri — URI に変換する | PHP 8.3 10608
XSLTProcessor::transformToUri (PHP 5, PHP 7, PHP 8) XSLTProcessor::transformToUri — URI に変換する 説明 public function XSLTProcessor::transformToUri ( object $document , string $uri ): int XSLTProcessor::importStylesheet() メソッドで与えら ... l' ); $xsl = new DOMDocument ; $xsl -> load ( 'collection.xsl' ); // 変換の設定を行う $proc = new XSLTProcessor ; $proc -> importStyleSheet ( $xsl ); // XSL ルールを適用する $proc -> transformToURI ( $xml , 'file:///tmp/out.html' ); ?> 例2 Dom\Document を使ってH ... ); $xsl = Dom\XMLDocument :: createFromFile ( 'collection.xsl' ); // 変換の設定を行う $proc = new XSLTProcessor ; $proc -> importStyleSheet ( $xsl ); // XSL ルールを適用する $proc -> transformToURI ( $xml , 'file:///tmp/out.html' ); ?> 参考 XSLTProcessor::transf ...
https://man.mtool.work/php/8.3/xsltprocessor.transformtouri.html
XSLTProcessor::transformToXml — XML に変換する | PHP 8.3 10432
XSLTProcessor::transformToXml (PHP 5, PHP 7, PHP 8) XSLTProcessor::transformToXml — XML に変換する 説明 public function XSLTProcessor::transformToXml ( object $document ): string | null | false xsltprocessor::importStylesheet() メソッドで与 ... l' ); $xsl = new DOMDocument ; $xsl -> load ( 'collection.xsl' ); // 変換の設定を行う $proc = new XSLTProcessor ; $proc -> importStyleSheet ( $xsl ); // XSL ルールを適用する echo $proc -> transformToXML ( $xml ); ?> 上の例の出力は以下となります。 Hey! Welcome to ... ); $xsl = Dom\XMLDocument :: createFromFile ( 'collection.xsl' ); // 変換の設定を行う $proc = new XSLTProcessor ; $proc -> importStyleSheet ( $xsl ); // XSL ルールを適用する echo $proc -> transformToXML ( $xml ); ?> 上の例の出力は以下となります。 Hey! Welcome to ...
https://man.mtool.work/php/8.3/xsltprocessor.transformtoxml.html
XSLTProcessor::transformToDoc — ドキュメント に変換する | PHP 8.3 10257
XSLTProcessor::transformToDoc (PHP 5, PHP 7, PHP 8) XSLTProcessor::transformToDoc — ドキュメント に変換する 説明 public function XSLTProcessor::transformToDoc ( object $document , ? string $returnClass = null ): DOMDocument | false XSLTProc ... essor::importStylesheet() メソッドで与えられたスタイルシートを適用し、 ソースノードをドキュメント (例: DOMDocument ) に変換します。 パラメータ doc ... l' ); $xsl = new DOMDocument ; $xsl -> load ( 'collection.xsl' ); // 変換の設定を行う $proc = new XSLTProcessor ; $proc -> importStyleSheet ( $xsl ); // XSL ルールを適用する echo trim ( $proc -> transformToDoc ( $xml )-> firstChild -> wholeText ); ?> 上の例の出力 ... ); $xsl = Dom\XMLDocument :: createFromFile ( 'collection.xsl' ); // 変換の設定を行う $proc = new XSLTProcessor ; $proc -> importStyleSheet ( $xsl ); // XSL ルールを適用する echo trim ( $proc -> transformToDoc ( $xml )-> firstChild -> wholeText ); ?> 上の例の出力 ...
https://man.mtool.work/php/8.3/xsltprocessor.transformtodoc.html
libxml のエラー処理関数によるエラー処理 | PHP 8.3 9540
libxml のエラー処理関数によるエラー処理 libxml にはエラー処理用の関数が用意されており、これらを使うと、 XSLT の処理中のエラーを捕らえて対応できます。 例1 fruits.xml 妥当な XML ファイルです。 <fruits> <fruit>Apple</fruit> <fruit>Banana</frui ... !"/></li> </xsl:template> </xsl:stylesheet> 例3 エラーの捕捉と表示 以下の例は、エラーを含むスタイルシートで XSLTProcessor::importStyleSheet() を呼んだ際に発生する libxml のエラーを捕らえて表示するものです。 <?php $xmldoc = new DOMDocument (); $xsldoc = new DOMDo ... c -> loadXML ( 'fruits.xml' ); $xsldoc -> loadXML ( 'fruits.xsl' ); libxml_use_internal_errors ( true ); $result = $xsl -> importStyleSheet ( $xsldoc ); if (! $result ) { foreach ( libxml_get_errors () as $error ) { echo "Libxml error: { $error -> message } \n" ...
https://man.mtool.work/php/8.3/xsl.examples-errors.html
XSLTProcessor クラス | PHP 8.3 9190
XSLTProcessor クラス (PHP 5, PHP 7, PHP 8) はじめに クラス概要 class XSLTProcessor { /* プロパティ */ public bool $ doXInclude = false ; public bool $ cloneDocument = false ; public int $ maxTemplateDepth ; public int $ maxTemplateVars ; /* ... $name ): string | false public function getSecurityPrefs (): int public function hasExsltSupport (): bool public function importStylesheet ( object $stylesheet ): bool public function registerPHPFunctionNS ( string $namespaceURI , string $name , callable $calla ... セキュリティ設定を取得する XSLTProcessor::hasExsltSupport — PHP が EXSLT をサポートしているかどうかを判定する XSLTProcessor::importStylesheet — スタイルシートを取り込む XSLTProcessor::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数として登録する XSL ...
https://man.mtool.work/php/8.3/class.xsltprocessor.html
XSLTProcessor::__construct — 新しい XSLTProcessor オブジェクトを作成する | PHP ... 8647
XSLTProcessor::__construct (PHP 5, PHP 7, PHP 8) XSLTProcessor::__construct — 新しい XSLTProcessor オブジェクトを作成する 説明 function XSLTProcessor::__construct () 新しい XSLTProcessor オブジェクトを作成します。 パラメータ この関数にはパラ ... d ( $xsl_filename ); $xmldoc = new DOMDocument (); $xmldoc -> load ( $xml_filename ); $xsl = new XSLTProcessor (); $xsl -> importStyleSheet ( $xsldoc ); echo $xsl -> transformToXML ( $xmldoc ); ?> ...
https://man.mtool.work/php/8.3/xsltprocessor.construct.html
XSL | PHP 8.3 7947
XSL はじめに XSL 拡張モジュールは、XSL の標準規格を実装したもので、 » libxslt ライブラリ を用いて » XSLT 変換 を行います。 インストール/設定 要件 インストール手順 定義済み定数 例 collection.xml および collection.xsl ファイルの例 libxml のエ ... セキュリティ設定を取得する XSLTProcessor::hasExsltSupport — PHP が EXSLT をサポートしているかどうかを判定する XSLTProcessor::importStylesheet — スタイルシートを取り込む XSLTProcessor::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数として登録する XSL ...
https://man.mtool.work/php/8.3/book.xsl.html
XSLTProcessor::setProfiling — プロファイル情報の出力ファイルを設定する | PHP 8.... 7947
XSLTProcessor::setProfiling (PHP >= 5.3.0, PHP 7, PHP 8) XSLTProcessor::setProfiling — プロファイル情報の出力ファイルを設定する 説明 public function XSLTProcessor::setProfiling ( ? string $filename ): true スタイルシート処理時のプロファイル ... 'collection.xsl' ); // 変換器を設定します $proc = new XSLTProcessor ; $proc -> setProfiling ( 'profiling.txt' ); $proc -> importStyleSheet ( $xsl ); // xsl ルールをアタッチします echo trim ( $proc -> transformToDoc ( $xml )-> firstChild -> wholeText ); ?> 上のコ ...
https://man.mtool.work/php/8.3/xsltprocessor.setprofiling.html
XSLTProcessor::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数と... 7404
XSLTProcessor::registerPHPFunctionNS (PHP >= 8.4.0) XSLTProcessor::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数として登録する 説明 public function XSLTProcessor::registerPHPFunctionNS ( string $namespaceURI , string $name ... trtoupper (...)); $proc -> registerPHPFunctionNS ( 'urn:my.ns' , 'count' , fn (array $arg1 ) => count ( $arg1 )); $proc -> importStyleSheet ( $xsldoc ); echo $proc -> transformToXML ( $xmldoc ); ?> 参考 DOMXPath::registerPhpFunctionNS() - PHP の関数を、名前空間付 ...
https://man.mtool.work/php/8.3/xsltprocessor.registerphpfunctionns.html
PREV 1 2 NEXT