Bug 15162 - Add for Unimarc transformation to new metadata formats
Summary: Add for Unimarc transformation to new metadata formats
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Frédéric Demians
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 13642
  Show dependency treegraph
 
Reported: 2015-11-09 18:13 UTC by Frédéric Demians
Modified: 2017-06-14 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15162 - Add for Unimarc transformation to new metadata formats (17.02 KB, patch)
2015-11-09 22:03 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC (17.39 KB, patch)
2015-11-10 08:35 UTC, Frédéric Demians
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC (17.53 KB, patch)
2015-11-11 14:42 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC (17.49 KB, patch)
2015-11-12 20:56 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC (17.49 KB, patch)
2015-11-12 20:58 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC (18.37 KB, patch)
2015-11-12 21:00 UTC, Frédéric Demians
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC (18.59 KB, patch)
2015-11-12 21:15 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC (18.64 KB, patch)
2016-01-13 12:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15162: Remove specific test in UNIMARCslim2*.xsl (3.12 KB, patch)
2016-01-13 12:26 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Demians 2015-11-09 18:13:59 UTC
MARC21/NORMARC have XSL files to transform marcxml biblio records into various
metadata formats: mods, mod3, oai-dc, rdfdc, rss2, srw_dc. Those XSL are
located in 'intranet-tmpl/prog/en/xslt' directory. For Unimarc, there is just
one XSL to transform record into OAI-DC format.
Comment 1 Héctor Eduardo Castro Avalos 2015-11-09 22:03:49 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2015-11-10 08:35:02 UTC Comment hidden (obsolete)
Comment 3 Héctor Eduardo Castro Avalos 2015-11-11 14:42:21 UTC Comment hidden (obsolete)
Comment 4 Frédéric Demians 2015-11-12 20:56:07 UTC Comment hidden (obsolete)
Comment 5 Frédéric Demians 2015-11-12 20:58:40 UTC Comment hidden (obsolete)
Comment 6 Frédéric Demians 2015-11-12 21:00:05 UTC Comment hidden (obsolete)
Comment 7 Héctor Eduardo Castro Avalos 2015-11-12 21:15:25 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2016-01-13 11:28:33 UTC
Comment on attachment 44825 [details] [review]
[SIGNED-OFF]Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC

Review of attachment 44825 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2RDFDC.xsl
@@ +142,5 @@
> +          <xsl:text>URN:ISSN:</xsl:text>
> +          <xsl:value-of select="marc:subfield[@code='a']"/>
> +        </dc:identifier>
> +      </xsl:for-each>
> +      <xsl:for-each select="marc:datafield[@tag=995]">

It seems that unapi does not return the item fields.

@@ +147,5 @@
> +        <dc:identifier>
> +          <xsl:text>LOC:</xsl:text>
> +          <xsl:choose>
> +            <xsl:when test="marc:subfield[@code='c']='MAIN'">Main library</xsl:when>
> +            <xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when>

Hum? :)
Comment 9 Frédéric Demians 2016-01-13 12:14:55 UTC
(In reply to Jonathan Druart from comment #8)
> Comment on attachment 44825 [details] [review] [review]
> [SIGNED-OFF]Bug 15162 Add for Unimarc XSL trans for RDF-DC & SRW-DC
> 
> Review of attachment 44825 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2RDFDC.xsl
> @@ +142,5 @@
> > +          <xsl:text>URN:ISSN:</xsl:text>
> > +          <xsl:value-of select="marc:subfield[@code='a']"/>
> > +        </dc:identifier>
> > +      </xsl:for-each>
> > +      <xsl:for-each select="marc:datafield[@tag=995]">
> 
> It seems that unapi does not return the item fields.

So it won't hurt. It's a cut-and-paste of the OAI-PMH XSL. 

> @@ +147,5 @@
> > +        <dc:identifier>
> > +          <xsl:text>LOC:</xsl:text>
> > +          <xsl:choose>
> > +            <xsl:when test="marc:subfield[@code='c']='MAIN'">Main library</xsl:when>
> > +            <xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when>
> 
> Hum? :)

It's how it is now for OAI XSL. It's not a regression... It won't display anything except if a Unimarc DB has a branch named MAIN or BIB2.
Comment 10 Jonathan Druart 2016-01-13 12:26:00 UTC
Created attachment 46582 [details] [review]
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

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Both XML formats generated successfully. Also fix
problem with OPACBaseURL in UNIMARC environment. Tested with Sandbox too.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2016-01-13 12:26:03 UTC
Created attachment 46583 [details] [review]
Bug 15162: Remove specific test in UNIMARCslim2*.xsl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2016-01-13 12:26:38 UTC
(In reply to Frédéric Demians from comment #9)
> > @@ +147,5 @@
> > > +        <dc:identifier>
> > > +          <xsl:text>LOC:</xsl:text>
> > > +          <xsl:choose>
> > > +            <xsl:when test="marc:subfield[@code='c']='MAIN'">Main library</xsl:when>
> > > +            <xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when>
> > 
> > Hum? :)
> 
> It's how it is now for OAI XSL. It's not a regression... It won't display
> anything except if a Unimarc DB has a branch named MAIN or BIB2.

I have removed them.
Comment 13 Frédéric Demians 2016-01-13 12:50:20 UTC
> I have removed them.

Good. Thanks for that, and thanks for the QA.
Comment 14 Brendan Gallagher 2016-01-27 06:01:07 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!