This queue is for tickets about the XML-LibXSLT CPAN distribution.

Report information
The Basics
Id:
13834
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
iwanttokeepanon [...] front.ru
Cc:
AdminCc:

BugTracker
Severity:
Normal
Broken in:
1.57
Fixed in:
(no value)



Subject: standalone="yes" not copied into result XML
Given this perl code, the standalone="yes" part of the XML declaration will _not_ be in the result XML document (note the xsl:output instruction): --------- begin my $strXML = '<?xml version="1.0" encoding="utf-8" standalone="yes"?> <a> text </a> '; my $strXSLT = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="utf-8" standalone="yes" indent="no" /> <xsl:template match="/"> <root> <node> <xsl:attribute name="const">1</xsl:attribute> <xsl:attribute name="time">midnight</xsl:attribute> <xsl:value-of select="a/child::text()" /> </node> <node> <xsl:attribute name="const">2</xsl:attribute> <xsl:attribute name="time">now</xsl:attribute> <xsl:value-of select="a/child::text()" /> </node> </root> </xsl:template> </xsl:stylesheet>'; my $oXML = new XML::LibXML(); my $oXSLT = new XML::LibXSLT(); my $oInputDocument = $oXML->parse_string( $strXML ); my $oInputSheet = $oXML->parse_string( $strXSLT ); my $oSheet = $oXSLT->parse_stylesheet( $oInputSheet ); my $oResults = $oSheet->transform( $oInputDocument ); print "\nDEBUG: results string ", $oResults->toString(); --------- end Note: the version and encoding DO get copied correctly. Note: xsltproc does have a standalone="yes" in the XML declaration line. E.g. output: DEBUG: results string <?xml version="1.0" encoding="utf-8"?> <root><node const="1" time="midnight"> text </node><node const="2" time="now"> text </node></root>
From: iwanttokeepanon@front.ru
On Fri Jul 22 19:00:23 2005, guest wrote:
Show quoted text
> print "\nDEBUG: results string ", $oResults->toString();
Never mind ... the last print statement should have been: print "\nDEBUG: results string ", $oSheet->output_string( $oResults );


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.