Changeset 4836


Ignore:
Timestamp:
19/01/09 10:27:31 (11 years ago)
Author:
cbyrom
Message:

Add xml schema to eXist and adjust the atom schemata to allow use of
this and to allow specification of xhtml elements in the content elements + extend output logging.

Location:
ndgCommon/trunk/ndg/common/src
Files:
2 edited

Legend:

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

    r4793 r4836  
    603603                     
    604604                self.__addGranuleToDataEntityRecords() 
    605             except: 
     605            except Exception, e: 
    606606                errorMessage = "Exception thrown whilst updating data entities - detail: " + \ 
    607                     str(sys.exc_info()) + \ 
     607                    str(e.message) + \ 
    608608                    "Will now roll back changes to granule atom to leave system in original state" 
    609609                logging.error(errorMessage) 
  • ndgCommon/trunk/ndg/common/src/models/Atom.py

    r4810 r4836  
    631631            content.attrib["type"] = "xhtml" 
    632632            div = ET.SubElement(content, 'div') 
    633             div.attrib["xmlns"] = ndgObject.XHTML_NS 
     633            div.attrib["xmlns:xhtml"] = ndgObject.XHTML_NS 
    634634            div.text = self.Content 
    635635         
     
    761761            else: 
    762762                logging.debug("No file data - adding contents of element instead") 
    763                 div = contentTag.find('{http://www.w3.org/1999/xhtml}div') 
     763#                div = contentTag.find('{http://www.w3.org/1999/xhtml}div') 
     764                div = contentTag.find('{%s}div'%ndgObject.ATOM_NS) 
    764765                self.Content = div.text 
    765766         
Note: See TracChangeset for help on using the changeset viewer.