Package: libxml-filter-xslt-perl Version: 0.03-8 Severity: normal XML::Filter::XSLT does not emit DTD events, even if there is an xsl:output element with the doctype-public and doctype-system attributes. This essentially means that XML::Filter::XSLT cannot be used to generate XHTML that can be usefully used in browsers. I'm pretty sure I know why it works this way, but I think it should be fixed.
I have attached a perl script and XSLT stylesheet. Running foo.pl should print a message if DTD handling work correctly. Alternately, you may pass the --writer flag to see the raw output that is generated, which includes no DOCTYPE declarations. -- System Information: Debian Release: 7.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.7-trunk-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/mksh-static Versions of packages libxml-filter-xslt-perl depends on: ii libxml-libxml-perl 2.0010+dfsg-1 ii libxml-libxslt-perl 1.78-1 ii perl 5.14.2-18 libxml-filter-xslt-perl recommends no packages. libxml-filter-xslt-perl suggests no packages. -- no debconf information -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
#!/usr/bin/perl
use XML::Filter::XSLT;
use XML::SAX::ParserFactory;
use XML::SAX::Base;
{
package Foo;
use base 'XML::SAX::Base';
sub start_dtd {
print "DTD handling called okay.\n";
}
}
my $opt = $ARGV[0] || '';
my $end;
if ($opt eq "--writer") {
require XML::SAX::Writer;
$end = XML::SAX::Writer->new;
}
else {
$end = Foo->new;
}
my $filter = XML::Filter::XSLT->new(Handler => $end);
$filter->set_stylesheet_uri("foo.xsl");
my $parser = XML::SAX::ParserFactory->parser(Handler => $filter);
$parser->parse_string("<a/>");
foo.xsl
Description: XML document
signature.asc
Description: Digital signature

