ZoteroToTEI

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

There is a good summary of the status of TEI/zotero interoperability at http://www.zotero.org/support/kb/tei. The official TEI bibliography is being constructed at http://www.zotero.org/groups/tei.

User commentary
Please sign all comments.


 * This version does not generate valid TEI fragments for book sections. A newer version is at https://github.com/paregorios/Zotero-RDF-to-TEI-XML . (Kshawkin)


 * See also TEIZoteroTranslator, which is now integrated into the Zotero plugin. (Kshawkin)

Source code and licensing

 * Source code is included at the bottom of this article
 * It was initially developed and posted by Laura Mandell (posted via Paul Caton) Announcement on TEI-L

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 version="2.0" 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" >



  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>