This is an automated notification sent by LCG Savannah.
It relates to:
                bugs #45689, project CDS Invenio

==============================================================================
 LATEST MODIFICATIONS of bugs #45689:
==============================================================================

Update of bug #45689 (project cdsware):

             Assigned to:                    None => bthiell                


==============================================================================
 OVERVIEW of bugs #45689:
==============================================================================

URL:
  <http://savannah.cern.ch/bugs/?45689>

                 Summary: tagclose in bibrecord.py does not handle singletons
correctly
                 Project: CDS Invenio
            Submitted by: mmarino12
            Submitted on: 2009-01-07 19:04
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: bthiell
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________


The tagclose function does not handle xml singletons correctly (e.g.
<tagname/>) and causes an incorrect error on well-formed xml.  The problem
can be fixed with the small change to the tagclose function:

    pat_open = '<' + tagname + '.*?>'

should be changed to

    pat_open = '<' + tagname + '[^/]*?>'

This disallows matching against singletons.  

    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: 2009-01-07 19:19              By: Mike Marino <mmarino12>
I've also found there are a few other issues in bibrecord that don't handle
singletons correctly.  

e.g. in create_record_RXP, one will receive iteration over non-sequence
errors as some of the code tries to iterate over 'None'.  This could be
solved by adding the ExpandEmpty=1 flag to the parse command:

root1 = pyrxp_parser.parse(xmltext, ExpandEmpty=1)

which turns singletons into empty lists instead of None.

I don't know about the code for the other parsing engines.





    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
4043                                | -UPD-
2800                                | -SUB-




==============================================================================

This item URL is:
  <http://savannah.cern.ch/bugs/?45689>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/


Reply via email to