[Silva-general] How to edit a metadata element of a Silva Document programmatically?

Nico Grubert nicogrubert at gmail.com
Fri Mar 10 10:34:57 CET 2006

Dear Silva developers,

in \Products\SilvaMetadata\Metadatatool.py there is a getMetadataValue() 
method which acts as an "accessor" to retrieve a value of a metadata 
element (e.g. to return the short title of a Silva document).

   set_name = 'silva-content'
   element_name = 'shorttitle'
   return context.service_metadata.getMetadataValue(
             mysilvadoc, set_name, element_name)

Is there a method available (setMetadataValue?) that acts as a "mutator" 
to edit a metadata value?

I'd like to do something like this:
context.service_metadata.setMetadataValue(mysilvadoc, myset,
element_name, element_value)


More information about the Silva-general mailing list