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

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

People
Owner:
Nobody in particular
Requestors:
jorda [...] edpsciences.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
1.66
Fixed in:
(no value)



Subject: DTD subset disappeare in the source document after the transformation
Strangly, an object XML::LibXML::Document losts its DTD after beeing used as a source of an XSLT transformation. XML-LibXSLT-1.62 XML-LibXML-1.66 libxml2.so.2.6.28 libxslt.so.1.1.24 perl, v5.8.8 built for i686-linux-thread-multi uname -a Linux gogol 2.6.17-gentoo-r8 #7 Wed Sep 27 14:05:28 CEST 2006 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux
Subject: test_xslt.pl
#! /usr/bin/perl use strict; use XML::LibXSLT; use XML::LibXML; my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); print "VERSION =",XML::LibXSLT::LIBXSLT_RUNTIME_VERSION(),"\n" ; my $source = $parser->parse_string(<<'EOT'); <?xml version="1.0" standalone="no"?> <!DOCTYPE article SYSTEM "article.dtd"> <article> </article> EOT my $style_doc = $parser->parse_string(<<'EOX'); <?xml version="1.0" encoding="utf-8"?> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="/"> <xsl:message>hello</xsl:message> </xsl:template> </xsl:transform> EOX print $source->toString(1); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); $stylesheet->output_string($results); print $source->toString(1);
Subject: article.dtd

Message body not shown because it is not plain text.

Thanks for the report, it is now fixed in SVN. Turned out that libxslt intentionally unlinks the internal subset from the document tree (although it remains accessible via $doc->internalSubset). In SVN there is a patch that links the internal subset back to the document where it was. -- Petr Dne po 08.pro.2008 10:47:28, jorda@edpsciences.org napsal(a):
Show quoted text
> Strangly, an object XML::LibXML::Document losts its DTD after beeing > used as a source of an XSLT transformation. > > XML-LibXSLT-1.62 > XML-LibXML-1.66 > > libxml2.so.2.6.28 > libxslt.so.1.1.24 > > perl, v5.8.8 built for i686-linux-thread-multi > > uname -a > Linux gogol 2.6.17-gentoo-r8 #7 Wed Sep 27 14:05:28 CEST 2006 i686 > Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux


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.