downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DomXsltStylesheet::result_dump_file> <DomProcessingInstruction::target
Last updated: Fri, 13 Nov 2009

view this page in

DomXsltStylesheet::process

(PHP 4 >= 4.1.0)

DomXsltStylesheet::processBir DomDocument nesnesine XSL dönüşümü uygular

Açıklama

DomXsltStylesheet
DomDocument process ( DomDocument $xml_belge [, array $xslt_değiştirgeleri [, bool $tırnaklı [, string $profil_dosyası ]]] )

Bir DomDocument nesnesine XSL dönüşümü uygular.

Değiştirgeler

xml_belge

Bir DomDocument nesnesi olarak dönüştürülecek XML belge.

xslt_değiştirgeleri

Değiştirge isimlerini ve değerlerini içeren bir ilişkisel dizi.

tırnaklı

FALSE belirtildiği takdirde xslt_değiştirgeleri 'nin değerleri tırnak içine alınır. Bu öntanımlı davranış olup, değerlerin PHP dizgeleri olarak aktarılmasını sağlar.

Bilginize: Dizgeleriniz hem tek hem de çift tırnaklar içeriyorsa, bu durumu dikkate alarak bu değiştirgeye TRUE atamalısınız.

profil_dosyası

Profil bilgilerini istiyorsanız bu değiştirgeye bir dosya yolu belirtmelisiniz.

Dönen Değerler

Dönüşüm sonucunu bir DomDocument nesnesi olarak döndürür,

Sürüm Bilgisi

Sürüm: Açıklama
4.3.0 profil_dosyası değiştirgesi eklendi.

Ayrıca Bakınız



add a note add a note User Contributed Notes
DomXsltStylesheet::process
msh at 247ms dot com
29-Oct-2006 07:36
Seems that the transformer is not handling "namespace-alias" correctly. I have been trying to generate XSL with my XML/XSL using this nice feature as described here:

http://www.topxml.com/xsl/examplegenss.asp
http://www.w3schools.com/xsl/el_namespace-alias.asp

Not sure if this is "correct" or "wrong" depending on how you look at it - but just make a note of it so you dont spend an entire Sunday trying to figure out what you did wrong since the basic examples aren't working :-)
Thomas Broyer
23-Aug-2005 07:54
Within LibXML/LibXSLT, the values of the parameters passed in to the XSLT stylesheet for processing are treated as being XPath expressions to be applied to the source document. This allows you to pass parameters of type "node-set".

This is actually the same as if you modified your XSLT stylesheet to change the default value of the top-level xsl:param to <xsl:param name="param-name" select="param-value" />

As this behavior might be a bit misleading, the PHP/DOMXML binding defaults to "converting" every parameter value to a string, as if you modified your XSLT stylesheet to change the default value of the top-level xsl:param to <xsl:param name="param-name" select="'param-value'" /> (note the single-quotes around the value and enclosed in double-quotes).

If you want to turn back to the original LibXML/LibXSLT behavior, just pass TRUE as the "is_param_xpath" argument.
regis at nvision dot lu
10-Jun-2004 09:48
Needless to say that xslt_parameters is an associative array. So for instance:

<?php
$document
= new DOMDocument('/path/to/xmldata');
// Unfortunately there's no such method for DomXsltStylesheet
$stylesheet = domxml_xslt_stylesheet_file('/path/to/stylesheet');
$params = array(
  
'param1' => 'value1'
  
...
   ,
'paramN' => 'valueN' );
$result = $stylesheet->process($document, $params);
?>

As far as the param_is_xpath argument is concerned, XPath W3REC doesn't mention any parameter at any time ! That must be a DOM feature, which I'm not keen with yet...

Bye

 
show source | credits | sitemap | contact | advertising | mirror sites