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.