ZoteroToTEI

Synopsis
This is an XSLT stylesheet to transform RDF/XML into TEI bibls

User commentary
Please sign all comments. (please leave the above note about signing comments, and add signed comments here below it)

Source code and licensing
Source code is included at the bottom of this article

Language(s)
XSLT

Documentation
None

Tech support
None

Here follows a Zotero to TEI XSLT, a simple one, that takes Zotero exported RDF and turns it into a listBibl with biblStruct.  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:vcard="http://nwalsh.com/rdf/vCard#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:z="http://www.zotero.org/namespaces/export#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:bib="http://purl.org/net/biblio#" xmlns:link="http://purl.org/rss/1.0/modules/link/" xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/" exclude-result-prefixes="xs rdf tei dc vcard foaf z dcterms bib link prism" version="2.0">



  Works Cited   

 

       <xsl:value-of select="substring-before(dc:date, '-')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="dc:date"/> </xsl:otherwise> </xsl:choose> </biblStruct> </xsl:template>

 <persName> <xsl:value-of select="foaf:Person/foaf:givenname"/> <xsl:value-of select="foaf:Person/foaf:surname"/> </persName> </xsl:template>

 <biblStruct> <xsl:value-of select="dc:title"/> <xsl:call-template name="author"/> <xsl:value-of select="following-sibling::bib:Journal[1]/dc:title"/> <xsl:value-of select="dc:date"/> <biblScope type="vol"><xsl:value-of select="following-sibling::bib:Journal[1]/prism:volume"/></biblScope> <biblScope type="issue"><xsl:value-of select="following-sibling::bib:Journal[1]/prism:number"/></biblScope> <biblScope type="pp"><xsl:value-of select="bib:pages"/></biblScope> </biblStruct> </xsl:template>

 

 <xsl:choose> <xsl:when test="z:itemType = 'conferencePaper'"> <biblStruct> <xsl:value-of select="dc:title"/> <xsl:call-template name="author"/> </biblStruct> </xsl:when> </xsl:choose> </xsl:template>



 <xsl:apply-templates select="bib:authors/rdf:Seq/rdf:li"/> </xsl:template>

</xsl:stylesheet>