parameters: (title, subject, creator, keywords, lastmodifiedby=None)
return_statement: return coreprops
docstring: Create core properties (common document properties referred to in the 'Dublin Core' specification).
      See appproperties() for other stuff.
docstring_summary: Create core properties (common document properties referred to in the 'Dublin Core' specification).
      See appproperties() for other stuff.
docstring_tokens: Create core properties ( common document properties referred to in the Dublin Core specification ) . See appproperties () for other stuff .
function: 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']:
          coreprops.append(etree.fromstring('''<dcterms:'''+doctime+''' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dcterms="http://purl.org/dc/terms/" xsi:type="dcterms:W3CDTF">'''+currenttime+'''</dcterms:'''+doctime+'''>'''))
          pass
      return coreprops
function_tokens: def coreproperties ( title , subject , creator , keywords , lastmodifiedby = None ) : 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' ] : coreprops . append ( etree . fromstring ( '''<dcterms:''' + doctime + ''' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dcterms="http://purl.org/dc/terms/" xsi:type="dcterms:W3CDTF">''' + currenttime + '''</dcterms:''' + doctime + '''>''' ) ) pass return coreprops