« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 8 of about 8 for stylesheet (0.003 sec.)
XSLTProcessor::importStylesheet — スタイルシートを取り込む | PHP 8.3 13230
XSLTProcessor::importStylesheet (PHP 5, PHP 7, PHP 8) XSLTProcessor::importStylesheet — スタイルシートを取り込む 説明 public function XSLTProcessor::importStylesheet ( object $stylesheet ): bool このメソッドは XSLTProcessor に変換のためのス ... タイルシートを取り込みます。 パラメータ stylesheet 取り込まれるスタイルシートを Dom\Document , DOMDocument , SimpleXMLElement オブジェクトとして指定します。 戻り値 成功した場 ... 合に true を、失敗した場合に false を返します。 エラー / 例外 stylesheet が XML オブジェクトでない場合、 TypeError をスローします。 変更履歴 バージョン 説明 8.4.0 Dom\Document のサポートが追加され ... ました。 8.4.0 stylesheet が XML オブジェクトでない場合、 ValueError の代わりに TypeError をスローするようになりました。 他のマニュアルの関連ページ ...
https://man.mtool.work/php/8.3/xsltprocessor.importstylesheet.html
collection.xml および collection.xsl ファイルの例 | PHP 8.3 9706
collection.xml および collection.xsl ファイルの例 このリファレンスにある多くの例は、XML ファイルと XSL ファイルの両方が必要です。 例では、以下の内容を含む collection.xml と collection.xsl を使用します。 例1 collection.xml <collection> <cd> ... itle>Electric Ladyland</title> <artist>Jimi Hendrix</artist> <year>1997</year> </cd> </collection> 例2 collection.xsl <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="owner" select="'Nicolas Eliaszewicz'"/> < ... ct="title"/></h1> <h2>by <xsl:value-of select="artist"/> - <xsl:value-of select="year"/></h2> <hr /> </xsl:template> </xsl:stylesheet> 他のマニュアルの関連ページ Django 4.1 Django 1.4.7 Django 1.1.2 DuckDB WHERE Clause FastAPI Templates Django csp ...
https://man.mtool.work/php/8.3/xsl.examples-collection.html
libxml のエラー処理関数によるエラー処理 | PHP 8.3 9308
libxml のエラー処理関数によるエラー処理 libxml にはエラー処理用の関数が用意されており、これらを使うと、 XSLT の処理中のエラーを捕らえて対応できます。 例1 fruits.xml 妥当な XML ファイルです。 <fruits> <fruit>Apple</fruit> <fruit>Banana</frui ... t> <fruit>Cherry</fruit> </fruits> 例2 fruits.xsl 無効な select 式が含まれています。 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" encoding="utf-8" indent="no"/> < ... template> <xsl:template match="fruit"> <li><xsl:value-of select="THIS IS A DELIBERATE ERROR!"/></li> </xsl:template> </xsl:stylesheet> 例3 エラーの捕捉と表示 以下の例は、エラーを含むスタイルシートで XSLTProcessor::importStyleSheet() を呼んだ際に発生する li ... oadXML ( '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::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数と... 8784
XSLTProcessor::registerPHPFunctionNS (PHP >= 8.4.0) XSLTProcessor::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数として登録する 説明 public function XSLTProcessor::registerPHPFunctionNS ( string $namespaceURI , string $name ... bob</uid> </user> <user> <uid>joe</uid> </user> </allusers> EOB; $xsl = <<<EOB <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="urn:my.ns"> <xsl:output method="html" encoding="u ... sl:value-of select="my:uppercase(string(uid))"/> </td> </tr> </xsl:for-each> </table> </body></html> </xsl:template> </xsl:stylesheet> EOB; $xmldoc = new DOMDocument (); $xmldoc -> loadXML ( $xml ); $xsldoc = new DOMDocument (); $xsldoc -> loadXML ( $xsl ) ... per (...)); $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
XSLTProcessor::registerPHPFunctions — PHP 関数を XSLT 関数として利用できるよう... 8784
XSLTProcessor::registerPHPFunctions (PHP 5 >= 5.0.4, PHP 7, PHP 8) XSLTProcessor::registerPHPFunctions — PHP 関数を XSLT 関数として利用できるようにする 説明 public function XSLTProcessor::registerPHPFunctions ( array | string | null $functi ... bob</uid> </user> <user> <uid>joe</uid> </user> </allusers> EOB; $xsl = <<<EOB <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl"> <xsl:output method="html" e ... of select="php:function('ucfirst',string(uid))"/> </td></tr> </xsl:for-each> </table> </body></html> </xsl:template> </xsl:stylesheet> EOB; $xmldoc = new DOMDocument (); $xmldoc -> loadXML ( $xml ); $xsldoc = new DOMDocument (); $xsldoc -> loadXML ( $xsl ) ... ; $proc = new XSLTProcessor (); $proc -> registerPHPFunctions (); $proc -> importStyleSheet ( $xsldoc ); echo $proc -> transformToXML ( $xmldoc ); ?> 参考 DOMXPath::registerPhpFunctions() - PHP の関数を XPath 関数と ...
https://man.mtool.work/php/8.3/xsltprocessor.registerphpfunctions.html
XSLTProcessor クラス | PHP 8.3 7862
XSLTProcessor クラス (PHP 5, PHP 7, PHP 8) はじめに クラス概要 class XSLTProcessor { /* プロパティ */ public bool $ doXInclude = false ; public bool $ cloneDocument = false ; public int $ maxTemplateDepth ; public int $ maxTemplateVars ; /* ... ): 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
DOMDocument::getElementById — id に対応する要素を検索する | PHP 8.3 7735
DOMDocument::getElementById (PHP 5, PHP 7, PHP 8) DOMDocument::getElementById — id に対応する要素を検索する 説明 public function DOMDocument::getElementById ( string $elementId ): ? DOMElement この関数は、 DOMDocument::getElementsByTagName ... <!ATTLIST books xmlns:xhtml CDATA #IMPLIED> <!ATTLIST book id ID #IMPLIED> <!ATTLIST author email CDATA #IMPLIED> ]> <?xml-stylesheet type="text/xsl" href="style.xsl"?> <books xmlns="http://books.php/" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <book id=" ...
https://man.mtool.work/php/8.3/domdocument.getelementbyid.html
変更履歴 | PHP 8.3 6832
変更履歴 標準添付の拡張モジュールには次のような変更がありました。 Version Function Description 8.6.0 ini_get_all 各ディレクティブについて返される詳細情報の配列に、 builtin_default_value 要素が追加されました。 snmp3_get Net-SNMP ライブラリが ... artDocument encoding に null バイトを含む値を指定すると、 ValueError がスローされるようになりました。 XSLTProcessor::importStylesheet Dom\Document のサポートが追加されました。 XSLTProcessor::importStylesheet stylesheet が XML オブジェクトでない場合、 Value ...
https://man.mtool.work/php/8.3/doc.changelog.html
PREV 1 NEXT