From: James C. <jc....@gm...> - 2014-03-18 13:16:53
|
If you can work in Ruby, there’s https://github.com/inukshuk/bibtex-ruby for parsing your bibtex. From that page: "BibTeX-Ruby is the Rubyist's swiss-army-knife for all things BibTeX. It includes a parser for all common BibTeX objects (@string, @preamble, @comment and regular entries) and a sophisticated name parser that tokenizes correctly formatted names; BibTeX-Ruby recognizes BibTeX string replacements, joins values containing multiple strings or variables, supports cross-references, and decodes common LaTeX formatting instructions to unicode; if you are in a hurry, it also allows for easy export/conversion to formats such as YAML, JSON, CiteProc/CSL, XML (BibTeXML), and RDF (experimental).” To format the citations, you can use a CSL (http://citationstyles.org) processor: https://github.com/inukshuk/citeproc-ruby which is written by Sylvester Kiel, the same guy who wrote bibtex-ruby Or there’s a java version: http://michel-kraemer.github.io/citeproc-java/ From that site: "citeproc-java is a Citation Style Language (CSL) processor for Java. It interprets CSL styles and generates citations and bibliographies. Some of the highlights in citeproc-java are: • With the BibTEX importer it is possible to create citations and bibliographies from BibTeX files. • The command line tool can be used to execute the library without setting up a development environment. This is great for testing, in particular if you are a CSL style author and want to test your style files in an easy and quick manner. • The library supports a wide range of output formats such as html, text, asciidoc, rtf, and fo.” About CSL: Zotero, Mendeley, CrossRef, BibSonomy, etc. all use CSL. From the CSL site: "In the last few years, CSL has become the standard way to add citation support to software. Over 6750 free CSL citation styles have been created by the community, and a wide range of commercial and open source software products now use CSL, including ACS ChemWorx Desktop, BibSonomy, Bielefeld University Library’s Katalog.plus!, colwiz, CrossRef, digi-libris Reader, Docear, Drupal, Fidus Writer, Islandora, Jekyll, Logos, Mendeley, Multilingual Zotero,pandoc, Paperpile, Papers, Qiqqa, ReadCube, Refeus, Talis Aspire, WordPress (KCite andZotpress plugins), and Zotero." james On Mar 18, 2014, at 4:37 AM, Sara L. Uckelman <sar...@as...> wrote: > Hi all, > > I'm quite new to TEI/XML/eXist so this may be a basic question to ask, > but I didn't see anything like it in the archives. > > I have a number of XML files each containing bibliographic details for > a single source marked up in TEI. I want to convert these into > citations that display nicely in HTML. (Well, what I REALLY want is > something that will take bibtex citations, convert them into XML, > and then into HTML, but I suppose that's too much to ask for.) If > all the citations contained the same info, it would be easy to write > a function to return the citation with proper formatting, on the > basis of the citation key. But the sources I have are extremely > varied, and trying to embed in all the possibilities into if-then > clauses doesn't strike me as the most efficient. Surely this is > something that many people have done before, and there's some code- > base out there that I could adapt, rather than write my own? > > Thanks, > -Sara > > -- > Dr. Sara L. Uckelman > Cluster of Excellence "Asia and Europe in a Global Context" > Karl Jaspers Centre for Advanced Transcultural Studies > Ruprecht-Karls Universität Heidelberg > http://www.rzuser.uni-heidelberg.de/~suckelma/ > http://dmnes.wordpress.com/ > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > eXist-TEIXML mailing list > eXi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-teixml |