'Document custom properties
@return: mapping of metadata
FIXME: This is ugly. We do not convert the properties as indicated
with the http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes
namespace'

@property
def customProperties(self):

    rval = {}
    if (len(self.content_types.getPathsForContentType(contenttypes.CT_CUSTOM_PROPS)) == 0):
        return rval
    XPath = lxml.etree.XPath
    properties_xpath = XPath('custom-properties:property', namespaces=ns_map)
    propname_xpath = XPath('@name')
    propvalue_xpath = XPath('*/text()')
    for tree in self.content_types.getTreesFor(self, contenttypes.CT_CUSTOM_PROPS):
        for elt in properties_xpath(tree.getroot()):
            rval[toUnicode(propname_xpath(elt)[0])] = u'    '.join(propvalue_xpath(elt))
    return rval
