XSLTProcessor::setParameterとは? わかりやすく解説

Weblio 辞書 > コンピュータ > PHP関数リファレンス > XSLTProcessor::setParameterの意味・解説 

XSLTProcessor::setParameter

(PHP 5)
XSLTProcessor::setParameter — パラメータの値を設定する

説明

class XSLTProcessor {
bool setParameter ( string namespace, string name, string value )
} class XSLTProcessor {
bool setParameter ( string namespace, array options )
} XSLTProcessor を使った変換のための 1 つあるいは多くのパラメータの値を設定します。 もしパラメータがスタイルシートに存在しない場合、無視されます。

パラメータ

namespace
XSLT パラメータの名前空間 URI を指定します。
name
XSLT パラメータのローカル名を指定します。パラメータ名に相当する文字列、 あるいは name => value の組の配列を指定可能です。
value
XSLT パラメータの新しい値を指定します。
options
名前 => 値 の組の配列を指定します。 この書式は PHP5.1.0 から利用可能です。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例 2469. 返還前に所有者を変更する
<?php

$collections = array(
   'Marc Rutkowski' => 'marc',
   'Olivier Parmentier' => 'olivier'
);

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

// 変換の設定を行う
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules

foreach ($collections as $name => $file) {
   // XML ソースをロードするLoad the XML source
   $xml = new DOMDocument;
   $xml->load('collection_' . $file . '.xml');

   $proc->setParameter('', 'owner', $name);
   $proc->transformToURI($xml, 'file:///tmp/' . $file . '.html');
}

?>


参考

XSLTProcessor::getParameter
XSLTProcessor::removeParameter



このページでは「PHP関数リファレンス」からXSLTProcessor::setParameterを検索した結果を表示しています。
Weblioに収録されているすべての辞書からXSLTProcessor::setParameterを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からXSLTProcessor::setParameter を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「XSLTProcessor::setParameter」の関連用語

XSLTProcessor::setParameterのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



XSLTProcessor::setParameterのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
PHP Documentation GroupPHP Documentation Group
Copyright © 1997 - 2025 by the PHP Documentation Group.

©2025 GRAS Group, Inc.RSS