HTML presentation of bibliography as in JabRef via CSL
Hello,
a client wanted a large bibliography as html table in order to show it on their site. After trying out other strategies, I used parts of a script by Mark Schenk used in JabRef, and wrote a CSL style that exports the data in html markup language. For the initial problems I had with conflict characters ( " and ' for html and js commands) I found a solution: The output of the CSL I pass through a macro in oo_writer that replaces conflict characters as follows:
" signs found in the Zotero data: & #34; (without the space between & and #)
' signs found in the Zotero data: & #39; (without the space between & and #)
|| replace by " (the CSL produces || for what I want to be a " in the html)
\ replace by ' (the CSL produces \ for what I want to be a ' in the html)
A sample entry as exported by my CSL:
<tr class="entry"><td>2010</td><td>Hurch, Bernhard</td><td><b>Wilhelm von Humboldt: Schriften zur Anthropologie der Basken</b></td><td>Guillermo de Humboldt: Obras a cerca de la antropología de los Vascos</td><td><small>LING HIST</small></td><td>monografía</td><td>Paderborn: Schöningh </td><td><a href="http://www.bbaw.de/bbaw/Forschung/Forschungsprojekte/wvhumboldt/de/Publikationen">URL</a> </td><td> </td>
</tr>
The abstract is displayed as tooltip mouseover, using "wz_tooltip.js" by Walter Zorn ( www.walterzorn.com ). It is there where ' signs cause conflicts.
Another problem was that tags cannot be exported via CSL. So I put the tags I wanted to be displayed in a free data field (I chose "archive_location").
The "extra" field I used for the translated "title", which was what the client wanted.
You find the CSL here:
http://www.pol-pol.org/Bibliografia_Alemana/HTMLTableDL.csl
And here you see the result:
http://www.pol-pol.org/Bibliografia_Alemana/Publicaciones_Aleman.html
a client wanted a large bibliography as html table in order to show it on their site. After trying out other strategies, I used parts of a script by Mark Schenk used in JabRef, and wrote a CSL style that exports the data in html markup language. For the initial problems I had with conflict characters ( " and ' for html and js commands) I found a solution: The output of the CSL I pass through a macro in oo_writer that replaces conflict characters as follows:
" signs found in the Zotero data: & #34; (without the space between & and #)
' signs found in the Zotero data: & #39; (without the space between & and #)
|| replace by " (the CSL produces || for what I want to be a " in the html)
\ replace by ' (the CSL produces \ for what I want to be a ' in the html)
A sample entry as exported by my CSL:
<tr class="entry"><td>2010</td><td>Hurch, Bernhard</td><td><b>Wilhelm von Humboldt: Schriften zur Anthropologie der Basken</b></td><td>Guillermo de Humboldt: Obras a cerca de la antropología de los Vascos</td><td><small>LING HIST</small></td><td>monografía</td><td>Paderborn: Schöningh </td><td><a href="http://www.bbaw.de/bbaw/Forschung/Forschungsprojekte/wvhumboldt/de/Publikationen">URL</a> </td><td> </td>
</tr>
The abstract is displayed as tooltip mouseover, using "wz_tooltip.js" by Walter Zorn ( www.walterzorn.com ). It is there where ' signs cause conflicts.
Another problem was that tags cannot be exported via CSL. So I put the tags I wanted to be displayed in a free data field (I chose "archive_location").
The "extra" field I used for the translated "title", which was what the client wanted.
You find the CSL here:
http://www.pol-pol.org/Bibliografia_Alemana/HTMLTableDL.csl
And here you see the result:
http://www.pol-pol.org/Bibliografia_Alemana/Publicaciones_Aleman.html
For any serious automatic generation, two-way access, of use of CSL styles, however, Kieren's approach allows for maximum flexibility and extensibility.
If you want to have style formatting capability in a page, the processor itself could be run in the browser window on client side. It runs cross-browser (as of yesterday), with confirmed success against the demo page with IE6 and up, Google Chrome, and Gecko-based browsers including Firefox.
So many possibilities ...