Ignore:
Timestamp:
16/02/09 12:41:56 (11 years ago)
Author:
cbyrom
Message:

Fix a couple of small formatting problems in atomutilities + create
test suite to properly test this + add a fix to the dif.xq and improve
the efficiency of the atom2DIF xquery.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/lib/atomutilities.py

    r4934 r4981  
    1010from ndg.common.src.lib.utilities import findElementIndex 
    1111import ndg.common.src.clients.xmldb.eXist.dbconstants as dc 
     12 
     13NEED_TO_RESOLVE_STRING = 'NEED TO RESOLVE' 
    1214 
    1315def addStandardKeywords(doc): 
     
    2426 
    2527    if index < 0: 
    26         errorMessage = "Could not find '%s' element in doc to insert organisation data after - skipping doc" %elementName 
     28        errorMessage = "Could not find '%s' element in doc to insert standard keyword data after - skipping doc" %elementName 
    2729        logging.error(errorMessage) 
    2830        raise ValueError(errorMessage) 
     
    6668                except: 
    6769                    # NB, this will currently fail since the vocab data is incomplete 
    68                     topicElement.text = uri + " (NEED TO RESOLVE)" 
     70                    topicElement.text = uri + " (%s)" %NEED_TO_RESOLVE_STRING 
    6971                 
    7072    logging.info("Parameters expanded") 
     
    123125    logging.info("Getting organisation data for repository, '%s'" %repositoryID) 
    124126    if repositoryID != 'badc.nerc.ac.uk' and repositoryID != 'neodc.nerc.ac.uk': 
    125         raise ValueError("Unrecognised repository ID, '$s'" %repositoryID) 
     127        raise ValueError("Unrecognised repository ID, '%s'" %repositoryID) 
    126128     
    127129    # NB, using the query() method (via the useChunked keyword) here results 
Note: See TracChangeset for help on using the changeset viewer.