From 37f61e309a2a0a81146c1e03ddf9a0cb5a1f1702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Tue, 10 Nov 2015 09:33:21 +0100 Subject: [PATCH] Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC Fix also, marginaly, OAI-DC XSL file which were using 090$a as biblionumber rather than 001. To test with an Unimarc Catalog: - Open this URL /cgi-bin/koha/unapi?id=koha:biblionumber:41201&format=marcxml And play with id & format parameters Test format=rdfdc and format=srw_dc - Or try with bug 13642 --- .../prog/en/xslt/UNIMARCslim2OAIDC.xsl | 6 +- .../prog/en/xslt/UNIMARCslim2RDFDC.xsl | 161 +++++++++++++++++++ .../prog/en/xslt/UNIMARCslim2SRWDC.xsl | 175 +++++++++++++++++++++ opac/unapi | 2 + 4 files changed, 340 insertions(+), 4 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2RDFDC.xsl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2SRWDC.xsl diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl index 04e5b24..212a112 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl @@ -162,11 +162,9 @@ - + - - /bib/ - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2RDFDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2RDFDC.xsl new file mode 100644 index 0000000..0c5c8f3 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2RDFDC.xsl @@ -0,0 +1,161 @@ + +]> + + + + + + + + + + + + + + + : + + + + + + , + + + + + + + + + + , + + + + , adapter + , annotator + , author of afterword + , prefacer + , bibliographic antecedent + , collaborator + , commentator + , compiler + , composer + , conceptor + , degree-grantor + , editor + , film editor + , founder + , illustrator + , lyricist + , organiser of meeting + , other + , photographer + , presenter + , publisher + , publishing director + , research team head + , reviewer + , redactor + , sponsor + , thesis advisor + , translator + + + + + + + + + + + , + + + / + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + abcdq + + + + + + + t + + + + + + + + + + + URN:ISBN: + + + + + + URN:ISSN: + + + + + + LOC: + + Main library + Library 2 + + + : + + + + + + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2SRWDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2SRWDC.xsl new file mode 100644 index 0000000..fe6b25b --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2SRWDC.xsl @@ -0,0 +1,175 @@ + +]> + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:variable name="title" select="marc:subfield[@code='a']"/> + <xsl:variable name="ntitle" + select="translate($title, '˜œ슜슛슘슈슉','')"/> + <xsl:value-of select="$ntitle" /> + <xsl:if test="marc:subfield[@code='e']"> + <xsl:text> : </xsl:text> + <xsl:for-each select="marc:subfield[@code='e']"> + <xsl:value-of select="."/> + </xsl:for-each> + </xsl:if> + <xsl:for-each select="marc:subfield[@code='h' or @code='i' or @code='v']"> + <xsl:text>, </xsl:text> + <xsl:value-of select="."/> + </xsl:for-each> + + + + + + + + , + + + + , adapter + , annotator + , author of afterword + , prefacer + , bibliographic antecedent + , collaborator + , commentator + , compiler + , composer + , conceptor + , degree-grantor + , editor + , film editor + , founder + , illustrator + , lyricist + , organiser of meeting + , other + , photographer + , presenter + , publisher + , publishing director + , research team head + , reviewer + , redactor + , sponsor + , thesis advisor + , translator + + + + + + + + + + + , + + + / + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + abcdq + + + + + + + t + + + + + + + + + + + URN:ISBN: + + + + + + URN:ISSN: + + + + + + LOC: + + Main library + Library 2 + + + : + + + + + + \ No newline at end of file diff --git a/opac/unapi b/opac/unapi index 7b21ee0..3465335 100755 --- a/opac/unapi +++ b/opac/unapi @@ -92,6 +92,8 @@ my $format_to_stylesheet_map = { 'marcxml' => 'identity.xsl', 'marcxml-full' => 'identity.xsl', 'oai_dc' => 'UNIMARCslim2OAIDC.xsl', + 'rdfdc', => 'UNIMARCslim2RDFDC.xsl', + 'srw_dc' => 'UNIMARCslim2SRWDC.xsl', }, }; -- 2.6.2