ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
XML::LibXML - vaidation problem
by Petr Pajas other posts by this author
Oct 2 2002 8:01AM messages near this date
view in the new Beta List Site
Re: Continuing Perl 5.8.0 Problems | Re: XML::LibXML - vaidation problem
Hi All,

I'm experiencing a strange problem. While the following piece of XML
passes through 'xmllint --valid' without problems it makes XML::LibXML
SIGSEGV during validation. On the other hand, almost all other XML
files with a DTD I have validate without problems. Is the problem
related to my configuration only or can also somebody else reproduce
it?

The XML:

<?xml version='1.0'?> 
<!DOCTYPE test [
 <!ELEMENT test (#PCDATA)> 
]> 
<test> 
</test> 

My configuration:

RH 7.2/7.3
perl 5.6.1
XML-LibXML 1.52/1.53/CVS
libxml-2.4.21/libxml-2.4.23

Here is a short test code:

#!/usr/bin/perl

use XML::LibXML;

my $parser=XML::LibXML-> new();
$parser-> validation(1);
my $doc=$parser-> parse_string(<<'EOF');
<?xml version='1.0'?> 
<!DOCTYPE test [
 <!ELEMENT test (#PCDATA)> 
]> 
<test> 
</test> 
EOF
print STDERR "parsed\n";                         # ok (even with validating parser)
print STDERR "validate: ",$doc-> validate(),"\n"; # SIGSEGV
print STDERR "valid: ",$doc-> is_valid(),"\n";    # would SIGSEGV too
print STDERR "done\n";                           # no way!

__END__

Thanks,

-- Petr
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Petr Pajas
Christian Glahn

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved