Changeset 1927

Show
Ignore:
Timestamp:
08/25/06 14:30:52
Author:
miyagawa
Message:

added support for utf-8 bytes with control code

Files:

Legend:

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

    r1870 r1927  
    11Revision history for Perl extension XML::Liberal 
     2 
     30.13_01 Fri Aug 25 14:30:11 JST 2006 
     4        - Added support for utf-8 bytes including control code 
    25 
    360.13  Sun Jul  9 22:03:35 JST 2006 
  • XML-Liberal/trunk/MANIFEST

    r1870 r1927  
    33lib/XML/Liberal/LibXML.pm 
    44lib/XML/Liberal/Remedy.pm 
     5lib/XML/Liberal/Remedy/ControlCode.pm 
    56lib/XML/Liberal/Remedy/EntityRef.pm 
    67lib/XML/Liberal/Remedy/HTMLEntity.pm 
    78lib/XML/Liberal/Remedy/InvalidEncoding.pm 
     9lib/XML/Liberal/Remedy/LowAsciiChars.pm 
    810lib/XML/Liberal/Remedy/NotUTF8.pm 
    911lib/XML/Liberal/Remedy/StandaloneAttribute.pm 
     
    5254t/bad/BAD-chr-7.xml 
    5355t/bad/BAD-chr-8.xml 
     56t/bad/BAD-control-cdata.xml 
     57t/bad/BAD-control.xml 
    5458t/bad/BAD-euc.xml 
    5559t/bad/BAD-html.xml 
  • XML-Liberal/trunk/MANIFEST.bak

    r1870 r1927  
    1616t/01_bad.t 
    1717t/02_global.t 
     18t/03_global_destroy.t 
    1819t/bad/BAD-ampersand.xml 
    1920t/bad/BAD-atttibute.xml 
  • XML-Liberal/trunk/lib/XML/Liberal.pm

    r1870 r1927  
    22 
    33use strict; 
    4 our $VERSION = '0.13'; 
     4our $VERSION = '0.13_01'; 
    55 
    66use base qw( Class::Accessor ); 
  • XML-Liberal/trunk/lib/XML/Liberal/LibXML.pm

    r1870 r1927  
    108108        return $remedy; 
    109109    } 
     110    elsif ($errors[0] =~ /^:(\d+): parser error : internal error/ && 
     111           $errors[3] && $errors[3] =~ /^:(\d+): parser error : Extra content at the end of the document/m) { 
     112        my($line) = ($1); 
     113        return XML::Liberal::Remedy::ControlCode->new; 
     114    } 
     115    elsif ($errors[0] =~ /^:(\d+): parser error : internal error/ && 
     116           $errors[3] && $errors[3] =~ /^:(\d+): parser error : Extra content at the end of the document/m) { 
     117        my($line) = ($1); 
     118        return XML::Liberal::Remedy::ControlCode->new; 
     119    } 
     120    elsif ($errors[0] =~ /^:(\d+): parser error : Unregistered error message/ && 
     121           $errors[3] && $errors[3] =~ /^:(\d+): parser error : internal error/ && 
     122           $errors[6] && $errors[6] =~ /^:(\d+): parser error : Extra content at the end of the document/m) { 
     123        my($line) = ($1); 
     124        return XML::Liberal::Remedy::ControlCode->new; 
     125    } 
     126    elsif ($errors[0] =~ /^:(\d+): parser error : CData section not finished/) { 
     127        my($line) = ($1); 
     128        return XML::Liberal::Remedy::ControlCode->new; 
     129    } 
     130    elsif ($errors[0] =~ /^:(\d+): parser error : xmlParseCharRef: invalid xmlChar value (\d+)/) { 
     131        my($line, $value) = ($1, $2); 
     132        return XML::Liberal::Remedy::LowAsciiChars->new; 
     133    } 
     134    elsif ($errors[0] =~ /^:(\d+): parser error : Unregistered error message/ && 
     135           $errors[3] && $errors[3] =~ /^:(\d+): parser error : Premature end of data in tag char line \d+/) { 
     136        my($line, $value) = ($1, $2); 
     137        return XML::Liberal::Remedy::ControlCode->new; 
     138    } 
    110139 
    111140    #warn $_[1]; 
  • XML-Liberal/trunk/t/01_bad.t

    r1709 r1927  
    1111for my $f (readdir D) { 
    1212    next unless $f =~ /\.xml$/; 
    13     next if $f =~ /chr|lowascii/; 
    1413 
    1514    my $parser = XML::LibXML->new;