docs: def coreproperties(title, subject, creator, keywords, lastmodifiedby=None):
      """
      Create core properties (common document properties referred to in the
      'Dublin Core' specification). See appproperties() for other stuff.
      """
      coreprops = makeelement('coreProperties', nsprefix='cp')
      coreprops.append(makeelement('title', tagtext=title, nsprefix='dc'))
      coreprops.append(makeelement('subject', tagtext=subject, nsprefix='dc'))
      coreprops.append(makeelement('creator', tagtext=creator, nsprefix='dc'))
      coreprops.append(makeelement('keywords', tagtext=','.join(keywords),
                       nsprefix='cp'))
      if not lastmodifiedby:
          lastmodifiedby = creator
      coreprops.append(makeelement('lastModifiedBy', tagtext=lastmodifiedby,
                       nsprefix='cp'))
      coreprops.append(makeelement('revision', tagtext='1', nsprefix='cp'))
      coreprops.append(
          makeelement('category', tagtext='Examples', nsprefix='cp'))
      coreprops.append(
          makeelement('description', tagtext='Examples', nsprefix='dc'))
      currenttime = time.strftime('%Y-%m-%dT%H:%M:%SZ')
      # Document creation and modify times
      # Prob here: we have an attribute who name uses one namespace, and that
      # attribute's value uses another namespace.
      # We're creating the element from a string as a workaround...
      for doctime in ['created', 'modified']:
          elm_str = (
              '<dcterms:%s xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc'
              'e" xmlns:dcterms="http://purl.org/dc/terms/" xsi:type="dcterms:'
              'W3CDTF">%s</dcterms:%s>'
          ) % (doctime, currenttime, doctime)
          coreprops.append(etree.fromstring(elm_str))
      return coreprops