#768: BibFormat: support non-HTML output modes easier (a simple tag?)
--------------------------+-----------------
  Reporter:  jblayloc     |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  major        |  Milestone:
 Component:  BibFormat    |    Version:
Resolution:               |   Keywords:
--------------------------+-----------------

Comment (by jcaffaro):

 Some quick comments that I don't have time to develop too much:

 1. BibFormat is agnostic to the way its output is used: in an HTML page,
 as raw text, XML, etc. It is already up to the format maintainer to
 specify if the output should be HTML-escaped or not for example. So you
 could add the proposed tags, but it would be other modules calling
 BibFormat (for eg. WebSearch) to make use of this tag, depending on the
 context.

 2. Note that currently the role of specifying the content-type is left to
 the ''output format'' (.bfo) instead of the ''format template'' (.bft). It
 seemed to make more sense to have it here, since a BibTeX output would
 remain ''text/plain'' whenever it deals with a foo (foo.bft) or a bar
 (bar.bft).

 3. BibFormat configuration files are designed to deal with individual
 records, not group of records (one .bft formats one record). One template
 represents the output of a single record (this really easier when creating
 template than when you have to think about a list of records, as with
 XSL). This is probably a bigger issue than what you described above to
 adopt .bft for atom feeds for example. Note also that having per-record
 formatting enables the following when searching: WebSearch retrieves list
 of records, and ask BibFormat to format the first one, write to the page
 (and send back to user), ask BibFormat to format second one, write to the
 page (and send back to user), ask BibFormat to format third one, etc.
 Still what seems to really miss in this case is the ability to specify a
 prefix, a suffix and a separator for each ''output format'': these are
 currently hard-coded in WebSearch, while the output formats could know
 about it. Each output format would link to a ''prefix.bft'',
 ''suffix.bft'' and ''separator.bft'' in addition to the ''contents.bft''
 files. Still it ''might'' be that in some cases the prefix must have
 access to some context that would potentially not be available from the
 BibFormat environment.

 4. Note that .bft can already be used for atom feed. We use an .xsl by
 default but a .bft would do.

 5. Note that there are some developments possibly going into the direction
 of this ticket in ticket:720

-- 
Ticket URL: <http://invenio-software.org/ticket/768#comment:2>
Invenio <http://invenio-software.org>

Reply via email to