summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/bibtex/bibhtml/bibhtml.xslt
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-12-23 23:54:09 +0000
committerKarl Berry <karl@freefriends.org>2007-12-23 23:54:09 +0000
commitaaee78ecc72d37a1b2e1fd07a4014a4d37ac06ed (patch)
tree8a36b27b21b8218213a22ebe249799e750c95683 /Master/texmf-dist/doc/bibtex/bibhtml/bibhtml.xslt
parent07c67f147175961b6f70e7f2ea01301f68b9937c (diff)
move bibhtml doc to bibtex
git-svn-id: svn://tug.org/texlive/trunk@5849 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/bibtex/bibhtml/bibhtml.xslt')
-rw-r--r--Master/texmf-dist/doc/bibtex/bibhtml/bibhtml.xslt55
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/bibtex/bibhtml/bibhtml.xslt b/Master/texmf-dist/doc/bibtex/bibhtml/bibhtml.xslt
new file mode 100644
index 00000000000..0980890f171
--- /dev/null
+++ b/Master/texmf-dist/doc/bibtex/bibhtml/bibhtml.xslt
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! bibhtml.xslt
+ !
+ ! Part of bibhtml, version 1.3, released 2006 October 31
+ ! 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.
+ !
+ ! $Revision: 1.1 $
+ !-->
+<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ exclude-result-prefixes="h"
+ xmlns:h="http://www.w3.org/1999/xhtml">
+
+ <x: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"/>
+
+ <x:template match="/">
+ <x:apply-templates select="//h:span[@class='cite']"/>
+ <x:call-template name="make-tex-command">
+ <x:with-param name="command">bibstyle</x:with-param>
+ <x:with-param name="content">plainhtml</x:with-param>
+ </x:call-template>
+ </x:template>
+
+ <x:template match="h:span[@class='cite']">
+ <x:call-template name="make-tex-command">
+ <x:with-param name="command">citation</x:with-param>
+ <x:with-param name="content">
+ <x:copy-of select="."/>
+ </x:with-param>
+ </x:call-template>
+ </x:template>
+
+ <x:template name="make-tex-command">
+ <x:param name="command"/>
+ <x:param name="content"/>
+ <x:text>\</x:text>
+ <x:value-of select="$command"/>
+ <x:text>{</x:text>
+ <x:value-of select="$content"/>
+ <x:text>}
+</x:text>
+ </x:template>
+
+</x:stylesheet>