Timothy Murphy escribió:
I've been trying some of the programs
in the PHP manual at <http://www.php.net/manual/en/>
in chapters CLXXXI and CLXXXII to work, for example
----------------------------
// Example 2519. Creating an XSLTProcessor

<?php

$xml_filename = "collection.xml";
$xsl_filename= "collection.xsl";

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

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

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

?>
----------------------------
(where I have added the two filenames,
and copied the files collection.x?l from the manual).

When I run PHP I get:
----------------------------
[EMAIL PROTECTED] Test]# php ex2519.php
// Example 2519. Creating an XSLTProcessor

Segmentation fault
----------------------------

I'm running the program under Fedora-6 Linux
with the latest versions of all programs.

Is there something I should have included,
to get the program to run?

Any advice or suggestions gratefully received.


Try not to load both xml and xsl in the same $doc variable... use one for the xsl and another for the xml. I think you are destroying the dom for the xsl before the transform...

--
Miguel J. Jiménez
Área de Internet/XSL/PHP
[EMAIL PROTECTED]

----------------------------------------------------

ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

"Killing is often a part of life. What's hypocritical is to condemn, and then make 
allowances when the situation suits."
Utu-Noranti Pralatong (Farscape 4x17 - A Constellation Of Doubt)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to