Created
June 3, 2012 10:06
-
-
Save tts/2862888 to your computer and use it in GitHub Desktop.
XML2CSV transformation of a selection of MARC fields from Vaski library consortia open bibliographic data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
version="2.0"> | |
<xsl:output encoding="UTF-8" method="text" indent="no"/> | |
<!-- | |
Selection of MARC fields from Vaski library consortia open bibliographic data | |
Transformation from XML to CSV. Field separator ";" | |
http://data.kirjastot.fi/data.html | |
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
Tuija Sonkkila 31.5.2012 | |
--> | |
<xsl:template match="//book"> | |
<xsl:value-of select="if (string-length(isbn) > 0) then isbn else 'NA'"/>;<xsl:value-of select="if (string-length(lang)>0) then lang else 'NA'"/>;<xsl:value-of select="if (string-length(year)>0) then year else 'NA'"/>;<xsl:value-of select="if (string-length(pages)>0) then pages else 'NA'"/>;<xsl:value-of select="if (string-length(size)>0) then size else 'NA'"/>;<xsl:value-of select="if (string-length(cat)>0) then cat else 'NA'"/> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment