Yes, my host doesnt have php configured with this extension. Well there was nothing left, but to modify the code. Because this forum application is so nice and sexy it just had to be done. With this modification in place, you can use orca in an default PHP/mysql instalation:
This last section takes care of the CDATA keyword and coments it, so it conforms to the XHTML standard. Dont know if this is a bug or difference introduced by diferent transformations.
Hope this saves some one some time :) I just couldnt wait to start using it!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Orca 1.1 this was implemented by default - if sablot xslt extention is not found .. Orca 1.1 use another method of transformation. Like you described.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, my host doesnt have php configured with this extension. Well there was nothing left, but to modify the code. Because this forum application is so nice and sexy it just had to be done. With this modification in place, you can use orca in an default PHP/mysql instalation:
line 96, file:BxXslTransform.php
replace
$xh = xslt_create();
xslt_setopt($xh, XSLT_SABOPT_IGNORE_DOC_NOT_FOUND);
$res = xslt_process ($xh, 'arg:/_xml', $this->_xsl, NULL, $args);
xslt_free($xh);
with
$doc = domxml_open_mem($this->_xml);
$stylesheet = domxml_xslt_stylesheet_file($this->_xsl);
$res = $stylesheet->process($doc, $params);
and
line 120+- , same file:
replace
$xh = xslt_create();
$res = xslt_process ($xh, $this->_xml, $this->_xsl, NULL, $args);
xslt_setopt($xh, XSLT_SABOPT_IGNORE_DOC_NOT_FOUND);
xslt_free($xh);
with
$doc = domxml_open_file($this->_xml);
$stylesheet = domxml_xslt_stylesheet_file($this->_xsl);
$res = $stylesheet->process($doc, $params);
and one more:
line 55, file: util.inc.php
replace
$xslt->process();
with
$doc = $xslt->process();
echo str_replace(Array('<![CDATA[',']]>'),Array('/*<![CDATA[*/','/*]]>*/'),$doc->dump_mem());
This last section takes care of the CDATA keyword and coments it, so it conforms to the XHTML standard. Dont know if this is a bug or difference introduced by diferent transformations.
Hope this saves some one some time :) I just couldnt wait to start using it!
Forgot to post this information before:
http://www.sitepoint.com/print/transform-php-xslt
It describes the process of installing the extensions needed to run orca unmodified.
Thank you a lot
In Orca 1.1 this was implemented by default - if sablot xslt extention is not found .. Orca 1.1 use another method of transformation. Like you described.