Testing the new fix...

        # check out 'fgtv.xmltv', ('freeguide' output).
        % wc -l tvvf.log 
        177899 tvvf.log

        % tv_validate_file fgtv.xmltv > tvvf.log 2>&1

        % nl -b a tvvf.log | head -n 5          
             1  The file is not well-formed xml:
             2  fgtv.xmltv:222: parser error : error parsing attribute name
             3      <length units="minutes" ="121"/>
             4                              ^
             5  fgtv.xmltv:222: parser error : attributes construct error
        % nl -b a tvvf.log | tail -n 5
        177895                                      ^
        177896   at /usr/share/perl5/XMLTV/ValidateFile.pm line 146
        177897   
        177898  The file did not validate as well-formed XML, so no further
        177899  processing was performed.

Line #1 is fine, but... 

In lines #177898-9 the phrase "so no further processing was performed"
to me suggests a relatively brief list of errors.  Also the old error
message's count would have been more useful, if it worked.  A feature
was amputated to fix this bug.

Attempt to summarize:

        % grep "error :" tvvf.log | sed -e 's/^.*error ://' -e 's/line.*$//' | 
sort | uniq -c
          19231  Couldn't find end of Start Tag episode-num 
            535  Couldn't find end of Start Tag length 
          19766  attributes construct error
          19766  error parsing attribute name

For cases where there are many errors, finishing the output with a
summary would be an improvement.  It might look like:

                                            ^
         at /usr/share/perl5/XMLTV/ValidateFile.pm line 146

          Summary of errors.                    total 59298
          =================================================
          Couldn't find end of Start Tag episode-num  19231
          Couldn't find end of Start Tag length         535
          attributes construct error                  19766
          error parsing attribute name                19766

        The file did not validate as well-formed XML, so no further
        processing was performed.

...this would put "no further" in a clear context.

I'm unsure whether to reopen this bug, or to leave it closed and file
a new 'wishlist' bug.  Please advise.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to