Skip to content

Instantly share code, notes, and snippets.

@tts tts/gist:2862877
Created Jun 3, 2012

Embed
What would you like to do?
Selection of MARC fields from Vaski library consortia open bibliographic data
<xsl:stylesheet xmlns:marc="info:lc/xmlns/marcxchange-v1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="marc" version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<!--
Selection of MARC fields from
Vaski library consortia open bibliographic data
http://data.kirjastot.fi/data.html
Lisenssi: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Tuija Sonkkila 31.5.2012
-->
<xsl:template match="/">
<xsl:apply-templates select="marc:collection/marc:record"/>
</xsl:template>
<xsl:template match="marc:record">
<book>
<isbn>
<xsl:value-of select="marc:datafield[@tag='021']/
marc:subfield[@code='a']"/>
</isbn>
<lang>
<xsl:value-of select="marc:datafield[@tag='041']/
marc:subfield[@code='a']"/>
</lang>
<year>
<xsl:value-of select="marc:datafield[@tag='260']/
marc:subfield[@code='c']"/>
</year>
<pages>
<xsl:value-of select="marc:datafield[@tag='300']/
marc:subfield[@code='a']"/>
</pages>
<size>
<xsl:value-of select="marc:datafield[@tag='300']/
marc:subfield[@code='c']"/>
</size>
<cat>
<xsl:value-of select="marc:datafield[@tag='098']/
marc:subfield[@code='a']"/>
</cat>
</book>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.