diff MetaDataFolder.py @ 20:9a1e75e708e1

small bugs in metadata context field in metadata docinfo added osa_system2 nicht mehr noetig
author dwinter
date Sun, 23 Oct 2011 21:29:02 +0200
parents 611b6df70840
children 5ed16f971297 d036de7fd78d
line wrap: on
line diff
--- a/MetaDataFolder.py	Thu Aug 04 16:55:22 2011 +0200
+++ b/MetaDataFolder.py	Sun Oct 23 21:29:02 2011 +0200
@@ -125,6 +125,7 @@
     def getXmlPathObj(self, xmlpath):
         """returns object at xmlpath"""
         # make xmlpath relative for Zope
+        logging.debug("XMlPAth:"+xmlpath)
         if xmlpath[0] == '/':
             xmlpath = xmlpath[1:]
             
@@ -198,6 +199,13 @@
         # information is two tags deep - recursive=1
         return self.getXmlPathFormatted('resource/meta/access-conditions/copyright', template, path=path, dom=dom, data=data, recursive=recursive, all=all)
     
+    def getContextData(self, path=None, dom=None, all=True):
+        """returns contents of context tag as dict"""
+        # information is two tags deep - recursive=1
+        
+        return self.getXmlPathData('resource/meta/context', path=path, dom=dom,  all=all)
+        
+    
     def getBibData(self, path=None, dom=None):
         """returns contents of bib tag as dict"""
         return self.resource.meta.bib.getData(path=path, dom=dom)