Problem with XSLT importStyleSheet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been trying to use PHP/XSLT on my desktop,
running Fedora-6 Linux (with all current updates).
The function importStyleSheet() seems to cause
a Segmentation Violation, as eg in the following script from
http://ie2.php.net/manual/en/function.xsl-xsltprocessor-construct.php
--------------------------------
// Example 2520. Creating an XSLTProcessor

<?php

$doc = new DOMDocument();
$xsl = new XSLTProcessor();

$doc->load($xsl_filename);
$xsl->importStyleSheet($doc);

$doc->load($xml_filename);
echo $xsl->transformToXML($doc);

?>
--------------------------------
[root@alfred Test]# php ex2520.php
// Example 2520. Creating an XSLTProcessor
Segmentation fault
--------------------------------

Or this script from
http://www.phpbuilder.com/manual/en/function.xsl-xsltprocessor-transform-to-xml.php
--------------------------------
<?php

$xsl = new DOMDocument('1.0','UTF-8');
$xml = new DOMDocument('1.0','UTF-8');

$xml->loadXML('collection.xml');
$xsl->loadXML('collection.xsl');
$xsl->documentURI = 'collection.xsl';

$xslProc = new XSLTProcessor();
$xslProc->importStyleSheet($xsl);

?>
--------------------------------
[root@alfred Test]# php test29.php
Segmentation fault
--------------------------------

I'd be very grateful if someone could check if these scripts work for you,
so I can see if it is a problem with Fedora PHP, or with PHP itself,
(or if I am doing something silly, which is quite probable).


-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux