diff options
author | Karl Berry <karl@freefriends.org> | 2009-08-14 23:55:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-08-14 23:55:17 +0000 |
commit | 0d16b3b7e2ce00f9de58a809a4ce47b39aaef068 (patch) | |
tree | 791c0999c492978ee744af2cb14e3605c135ba2d /Master/texmf-dist/doc/bibtex/bibhtml/bibhtml-insert-bib.xslt | |
parent | 8c1962d0507c747e0e1a8870dfd758365c5f63ff (diff) |
bibhtml 2.0 (9aug09)
git-svn-id: svn://tug.org/texlive/trunk@14680 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/bibtex/bibhtml/bibhtml-insert-bib.xslt')
-rw-r--r-- | Master/texmf-dist/doc/bibtex/bibhtml/bibhtml-insert-bib.xslt | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/bibtex/bibhtml/bibhtml-insert-bib.xslt b/Master/texmf-dist/doc/bibtex/bibhtml/bibhtml-insert-bib.xslt new file mode 100644 index 00000000000..fb1d64b319a --- /dev/null +++ b/Master/texmf-dist/doc/bibtex/bibhtml/bibhtml-insert-bib.xslt @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ! bibhtml-extract-aux.xslt + ! + ! Part of bibhtml, version 2.0, released 2009 August 9 + ! Hg node 4a5600417b09. + ! See <http://purl.org/nxg/dist/bibhtml> + ! + ! This sample script processes an XML file which contains elements like + ! <span class='cite'>citation</span>, extracting each of the `citation' + ! strings and emitting a .aux file which, once a \bibdata line has been + ! appended, is suitable for processing with BibTeX. Adapt or extend as + ! appropriate. + !--> +<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" + version="1.0" + exclude-result-prefixes="h" + xmlns:h="http://www.w3.org/1999/xhtml"> + + <output method="xml" + version="1.0" + doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" + doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" + omit-xml-declaration="yes"/> + + <param name='bibfile-name'>bibliography</param> + + + <!-- identity transform --> + <template match="*"> + <copy> + <copy-of select="@*"/> + <apply-templates/> + </copy> + </template> + + <template match="h:span[@class='cite']"> + <h:a> + <attribute name='href'> + <text>#</text> + <copy-of select='.'/> + </attribute> + <copy-of select='.'/> + </h:a> + </template> + + <template match='processing-instruction("bibliography")'> + <copy-of select='document(concat($bibfile-name,".bbl"))'/> + </template> +</stylesheet> |