« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 16 for stylesheet (0.003 sec.)
スタイルシートを取り込む 12407
« XSLTProcessor::hasExsltSupport XSLTProcessor::registerPHPFunctionNS » PHP Manual XSLTProcessor スタイルシートを取り込む 検索 XSLTProcessor::importStylesheet (PHP 5, PHP 7, PHP 8) XSLTProcessor::importStylesheet — スタイルシートを取り込む ... 説明 public function XSLTProcessor::importStylesheet ( object $stylesheet ): bool このメソッドは XSLTProcessor に変換のためのスタイルシートを取り込みます。 パラメータ styleshe ... leXMLElement オブジェクトとして指定します。 戻り値 成功した場合に true を、失敗した場合に false を返します。 エラー / 例外 stylesheet が XML オブジェクトでない場合、 TypeError をスローします。 変更履歴 バージョン 説明 8.4.0 Dom\Document のサポートが追加され ... ました。 8.4.0 stylesheet が XML オブジェクトでない場合、 ValueError の代わりに TypeError をスローするようになりました。 関連キーワード: XSLTProcess ...
https://man.mtool.work/php/8.3/xsltprocessor.importstylesheet.html
スタイルシートを取り込む 12303
« XSLTProcessor::hasExsltSupport XSLTProcessor::registerPHPFunctionNS » PHP Manual XSLTProcessor スタイルシートを取り込む 検索 XSLTProcessor::importStylesheet (PHP 5, PHP 7, PHP 8) XSLTProcessor::importStylesheet — スタイルシートを取り込む ... 説明 public function XSLTProcessor::importStylesheet ( object $stylesheet ): bool このメソッドは XSLTProcessor に変換のためのスタイルシートを取り込みます。 パラメータ styleshe ... leXMLElement オブジェクトとして指定します。 戻り値 成功した場合に true を、失敗した場合に false を返します。 エラー / 例外 stylesheet が XML オブジェクトでない場合、 TypeError をスローします。 変更履歴 バージョン 説明 8.4.0 Dom\Document のサポートが追加され ... ました。 8.4.0 stylesheet が XML オブジェクトでない場合、 ValueError の代わりに TypeError をスローするようになりました。 関連キーワード: XSLTProcess ...
https://man.mtool.work/php/8.3/xsltprocessor.importstylesheet.html
collection.xml および collection.xsl ファイルの例 9686
« 例 libxml のエラー処理関数によるエラー処理 » PHP Manual 例 collection.xml および collection.xsl ファイルの例 検索 collection.xml および collection.xsl ファイルの例 このリファレンスにある多くの例は、XML ファイルと XSL ファイルの両方が必要で ... 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> 関連キーワード: xsl collection select xml cd title artist year template value stylesheet owner match Search libxml リファ ...
https://man.mtool.work/php/8.3/xsl.examples-collection.html
collection.xml および collection.xsl ファイルの例 9686
« 例 libxml のエラー処理関数によるエラー処理 » PHP Manual 例 collection.xml および collection.xsl ファイルの例 検索 collection.xml および collection.xsl ファイルの例 このリファレンスにある多くの例は、XML ファイルと XSL ファイルの両方が必要で ... 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> 関連キーワード: collection title artist year template stylesheet owner match libxml リファレンス 両方 Fight mind Harper E ...
https://man.mtool.work/php/8.3/xsl.examples-collection.html
libxml のエラー処理関数によるエラー処理 9305
« collection.xml および collection.xsl ファイルの例 XSLTProcessor » PHP Manual 例 libxml のエラー処理関数によるエラー処理 検索 libxml のエラー処理関数によるエラー処理 libxml にはエラー処理用の関数が用意されており、これらを使うと、 XSLT の処 ... Apple</fruit> <fruit>Banana</fruit> <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
libxml のエラー処理関数によるエラー処理 9305
« collection.xml および collection.xsl ファイルの例 XSLTProcessor » PHP Manual 例 libxml のエラー処理関数によるエラー処理 検索 libxml のエラー処理関数によるエラー処理 libxml にはエラー処理用の関数が用意されており、これらを使うと、 XSLT の処 ... Apple</fruit> <fruit>Banana</fruit> <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
PHP の関数を、名前空間付きの XSLT 関数として登録する 8820
« XSLTProcessor::importStylesheet XSLTProcessor::registerPHPFunctions » PHP Manual XSLTProcessor PHP の関数を、名前空間付きの XSLT 関数として登録する 検索 XSLTProcessor::registerPHPFunctionNS (PHP >= 8.4.0) XSLTProcessor::registerPHPFunctio ... 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
PHP 関数を XSLT 関数として利用できるようにする 8820
« XSLTProcessor::registerPHPFunctionNS XSLTProcessor::removeParameter » PHP Manual XSLTProcessor PHP 関数を XSLT 関数として利用できるようにする 検索 XSLTProcessor::registerPHPFunctions (PHP 5 >= 5.0.4, PHP 7, PHP 8) XSLTProcessor::registerP ... 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
PHP の関数を、名前空間付きの XSLT 関数として登録する 8040
« XSLTProcessor::importStylesheet XSLTProcessor::registerPHPFunctions » PHP Manual XSLTProcessor PHP の関数を、名前空間付きの XSLT 関数として登録する 検索 XSLTProcessor::registerPHPFunctionNS (PHP >= 8.4.0) XSLTProcessor::registerPHPFunctio ... 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
PHP 関数を XSLT 関数として利用できるようにする 8040
« XSLTProcessor::registerPHPFunctionNS XSLTProcessor::removeParameter » PHP Manual XSLTProcessor PHP 関数を XSLT 関数として利用できるようにする 検索 XSLTProcessor::registerPHPFunctions (PHP 5 >= 5.0.4, PHP 7, PHP 8) XSLTProcessor::registerP ... 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
PREV 1 2 NEXT