> Problems with php_domxml and his xslt support (output settings not used)

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

 



Hi

I am using the domxml php extension for transforming XSLT, only I have the problem that it doesnt take some of my <XSL:output> settings into acocunt. For example when I set ident="yes" it doesn't ident the output, and when I enabled the "omit-xml-declaration"-attribute this <?xml> declaration is this availabe, which should not in the output.

The XSL:Output I use:

<xsl:output
		doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";
		encoding="UTF-8"
		method="xml"
		indent="yes"
		omit-xml-declaration="yes"
	/>

When I use the exact same XSLT file with php_xslt extension/Sablotron the output is as expected both settings are taken into account. Does anyone know if I am doing something wrong in my code? (see code below)
I think it's a bug in the php_xmldom extension, because when I use xsltproc.exe (standalone version libxsl) the output is okay too.



The code I use for transforming the xml file can be find below:

//
// Process the XML file together with the XSLT file to generate the apporiate XHTML page...
$xml = domxml_open_mem( $result ); // create a XmlDocument-object with the return xml file...
if ( !$xml ) {
die( "Error while parsing the XML document. Application has aborted." );
}


// assign the XSLT stylesheet for this XML document...
$xsl = domxml_xslt_stylesheet_file( $xsl_file );

// process the XSLT stylesheet with the assigned XML document...
$result = NULL;
$result = $xsl->process( $xml );

if ( DEBUG_MODE ) {			
	$result->dump_file( $output_file );
}
echo $result->dump_mem();
$xml->free(); // dispose the object

Yours,

Weyert de Boer (me@xxxxxxxxxx)

Check out my blog: http://www.weyert.com/

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux