On Thu, 21 Jun 2012, Jerome Caffaro wrote: > Finally I would see more opportunities in introducing some > independence from MARC tags in bfe_*.py, such that some bfe_title > would by default not call bfo.field("245__a") but bfo_field('title'), > where 'title' would be mapped to a MARC tag in a centralized place > (this is/was already kind of existing, but this is not the topic of > this thread)
+1 For a low-level logical representation of MARC tags, one can use get_tag_from_name('title') technique. It is already used in many places in Invenio, and should be used even more. For a high-level logical representation of logical fields, title sometimes means 245__a, sometimes 711__a, etc, depending on the collection. So we have tag vs field relation to consider, depending on conditions. Here bfe_title is useful, but only for formatting, not indexing. Virtual elements may help here, to be used commonly for formatting, indexing and other use cases. Accessing MARC can be one case. Best regards -- Tibor Simko