Changeset 1829

Show
Ignore:
Timestamp:
05/26/06 14:11:56
Author:
miyagawa
Message:

new remedy UndeclaredNS

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • XML-Liberal/trunk/Changes

    r1798 r1829  
    11Revision history for Perl extension XML::Liberal 
     2 
     30.07  2006-05-26 
     4        - New remedy UndeclaredNS to rescue undeclared namespaces found in Atom/RSS feeds. 
    25 
    360.06  2006-03-06T06:48:55Z 
  • XML-Liberal/trunk/MANIFEST

    r1793 r1829  
    88lib/XML/Liberal/Remedy/NotUTF8.pm 
    99lib/XML/Liberal/Remedy/StandaloneAttribute.pm 
     10lib/XML/Liberal/Remedy/UndeclaredNS.pm 
    1011lib/XML/Liberal/Remedy/UnquotedAttribute.pm 
    1112lib/XML/Liberal/Remedy/XHTMLEmptyTag.pm 
    1213Makefile.PL 
    1314MANIFEST                        This list of files 
    14 META.yml                        Module meta-data (added by MakeMaker) 
    1515t/00_compile.t 
    1616t/01_bad.t 
     
    5252t/bad/BAD-html.xml 
    5353t/bad/BAD-lowascii.xml 
     54t/bad/BAD-undeclared-ns-element.xml 
     55t/bad/BAD-undeclared-ns.xml 
    5456t/bad/BAD-unquoted-nbsp.xml 
    5557t/bad/BAD-unquoted.xml 
  • XML-Liberal/trunk/MANIFEST.bak

    r1793 r1829  
    88lib/XML/Liberal/Remedy/NotUTF8.pm 
    99lib/XML/Liberal/Remedy/StandaloneAttribute.pm 
     10lib/XML/Liberal/Remedy/UndeclaredNS.pm 
    1011lib/XML/Liberal/Remedy/UnquotedAttribute.pm 
    1112lib/XML/Liberal/Remedy/XHTMLEmptyTag.pm 
     
    5152t/bad/BAD-html.xml 
    5253t/bad/BAD-lowascii.xml 
     54t/bad/BAD-undeclared-ns-element.xml 
     55t/bad/BAD-undeclared-ns.xml 
    5356t/bad/BAD-unquoted-nbsp.xml 
    5457t/bad/BAD-unquoted.xml 
    55 META.yml                                 Module meta-data (added by MakeMaker) 
  • XML-Liberal/trunk/lib/XML/Liberal.pm

    r1798 r1829  
    22 
    33use strict; 
    4 our $VERSION = '0.06'; 
     4our $VERSION = '0.07'; 
    55 
    66use base qw( Class::Accessor ); 
  • XML-Liberal/trunk/lib/XML/Liberal/LibXML.pm

    r1793 r1829  
    6969        return $remedy; 
    7070    } 
     71    elsif ($errors[0] =~ /^:(\d+): namespace error : Namespace prefix (\S+)(?: for (\S+))? on (\S+) is not defined/) { 
     72        my($line, $prefix, $attr, $element) = ($1, $2, $3, $4); 
     73        my $pos = $self->get_pos($errors[2]); 
     74        defined($pos) or Carp::carp("Can't get pos from $error"), return; 
     75 
     76        my $remedy = XML::Liberal::Remedy::UndeclaredNS->new($self, $line, $pos, $error); 
     77        $remedy->prefix($prefix); 
     78        return $remedy; 
     79    } 
    7180 
    7281    #warn $_[1];