Skip Menu |

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

Report information
The Basics
Id: 66278
Status: stalled
Priority: 0/
Queue: XML-Saxon-XSLT2

People
Owner: perl [...] toby.ink
Requestors: quentin [...] mit.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.004
Fixed in: (no value)



Subject: xsl:result-document element doesn't work
Even with the output method "default" being passed as the second parameter to transform(), XML::Saxon::XSLT2 appears to ignore the format requested with xsl:result-document. Here's a sample source document and stylesheet: in.xml: <?xml version="1.0" encoding="UTF-8"?> <empty> </empty> out.xsl: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output name="text" method="text" encoding="utf-8" /> <xsl:template match="/"> <xsl:result-document format="text"> <outElement>This should not be wrapped in a tag.</outElement> </xsl:result-document> </xsl:template> </xsl:stylesheet> When processing this stylesheet with the net.sf.Saxon.Transform tool, it correctly produces the output "This should not be wrapped in a tag.". When processing it with XML::Saxon::XSLT2, it produces "<?xml version="1.0" encoding="UTF-8"?> <outElement>This should not be wrapped in a tag.</outElement>" I've attached a zip file with these source fragments and a simple driver script that demonstrates the problem. I tried to dig into the source to figure out what is causing the problem, but I got lost in all the indirection in the Saxon API.
Subject: output-bug.zip
Download output-bug.zip
application/zip 1.1k

Message body not shown because it is not plain text.

I can confirm this bug, but don't know enough about Saxon's internals to correct it. Patches welcome. As a workaround, explicitly requesting "text" output rather than "default" gets you what you want. $trans->transform($input, 'text');