Re: How to limit errors from XML::LibXML::Schema

"Martin J. Evans" <[email protected]> Thu, 16 Sep 2010 15:07:26 +0100
Newsgroups gmane.comp.lang.perl.xml
Organization Easysoft Limited
Message-ID <[email protected]>
On 16/09/10 14:47, Ludwig, Michael wrote:
>>> Don't know. You could give suppress_errors [1] a try, but I'm
>>> neither sure it is applicable for schema validation errors nor
>>> it works at all [2].
>>>
>>> [1] perldoc XML::LibXML::Parser
>>> [2] https://rt.cpan.org/Public/Bug/Display.html?id=58024
>>>
>>
>> perl -MXML::LibXML -le 'my $h = 
>> XML::LibXML::Schema->new(string => q|<xs:schema 
>> xmlns:xs="http://www.w3.org/2001/XMLSchema"></xs:schema>|); 
>> $h->suppress_errors();'
>>
>> Can't locate object method "suppress_errors" via package 
>> "XML::LibXML::Schema" at -e line 1.
> 
> That's not how it is supposed to work. It's an option you feed
> to the parser as shown in the sample script at the RT URL.
> 
>   XML::LibXML->new( suppress_errors => 1 )

OOPs, sorry, I've not visited that code for a while and although I read the pod for suppress_errors I assumed it was a method not an attribute.

> But there was a reason I filed the bug report. And as I said,
> I don't know if it is supposed to be applicable for schema.

It doesn't seem to. 

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs