Bug 5565 - Default OAI UNIMARC to Dublin Core XSL adds superfluous blanks
Summary: Default OAI UNIMARC to Dublin Core XSL adds superfluous blanks
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Z39.50 / SRU / OpenSearch Servers (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Frédéric Demians
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-31 06:22 UTC by Frédéric Demians
Modified: 2012-10-25 23:09 UTC (History)
3 users (show)

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


Attachments
Proposed patch (1.17 KB, patch)
2011-09-27 16:08 UTC, Frédéric Demians
Details | Diff | Splinter Review
Proposed patch 2 (16.64 KB, patch)
2011-09-27 16:09 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 5565 Default OAI UNIMARC to Dublin Core XSL adds superfluous blanks (1.22 KB, patch)
2011-12-19 08:04 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 5565 UNIMARC to DC XSL tidy up (16.92 KB, patch)
2011-12-19 08:23 UTC, Chris Cormack
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 2010-12-31 06:22:11 UTC
DC <dc:creator> contains blanks between forename and surname.
Comment 2 MJ Ray (software.coop) 2011-01-04 10:25:39 UTC
This bug is mentioned in:
Bug 5565 UNIMARC to DC XSL tidy up http://lists.koha-community.org/pipermail/koha-patches/2010-December/013486.html
Comment 3 Paul Poulain 2011-09-27 15:47:48 UTC
the patch pointed by MJ & Frederic does not apply :

17:45 ~/koha.dev/koha-community (BZ5565 $%)$ git am -3 BZ5565.eml
Applying: Bug 5565 UNIMARC to DC XSL tidy up
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 5565 UNIMARC to DC XSL tidy up
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Comment 4 Frédéric Demians 2011-09-27 16:08:44 UTC Comment hidden (obsolete)
Comment 5 Frédéric Demians 2011-09-27 16:09:07 UTC Comment hidden (obsolete)
Comment 6 Frédéric Demians 2011-09-27 16:10:20 UTC
> the patch pointed by MJ & Frederic does not apply :

I rebase it to HEAD. It should work better.
Comment 7 Paul Poulain 2011-10-24 11:38:18 UTC
Updating Version : This ENH will be for Koha 3.8
Comment 8 Paul Poulain 2011-10-25 15:05:55 UTC
Bug versionned for master. entries will be made against rel_3_8 once the patch has been applied (see thread about that on koha-devel yesterday)
Comment 9 Chris Cormack 2011-12-15 00:18:10 UTC
Frederic, both patches need to be applied?
Comment 10 Frédéric Demians 2011-12-15 06:04:23 UTC
(In reply to comment #9)
> Frederic, both patches need to be applied?

Both patch still apply on HEAD. The first one fix the superfluous blanks issue and the second tidy up the UNIMARC to DC XSL file (better indentation for readability).

To test:

1. On an UNIMARC Koha, activate the OAI server
2. Get the first batch of records from the OAI server:
   /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc
3. Ask your browser to show you the source XML file
4. You will see that there is a new line in the <dc:creator>
5. Apply the patch and repeat 2-3
Comment 11 Chris Cormack 2011-12-19 08:04:38 UTC
Created attachment 6862 [details] [review]
Bug 5565 Default OAI UNIMARC to Dublin Core XSL adds superfluous blanks

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 12 Chris Cormack 2011-12-19 08:07:33 UTC
Signed off on the first patch

But the second one deletes the leader as well as changing the indentation

-		<xsl:variable name="leader" select="marc:leader"/>
-		<xsl:variable name="leader6" select="substring($leader,7,1)"/>
-		<xsl:variable name="leader7" select="substring($leader,8,1)"/>
-		<xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>

Should this be happening?
Comment 13 Frédéric Demians 2011-12-19 08:21:18 UTC
(In reply to comment #12)
> Signed off on the first patch
> 
> But the second one deletes the leader as well as changing the indentation
> 
> -        <xsl:variable name="leader" select="marc:leader"/>
> -        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
> -        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
> -        <xsl:variable name="controlField008"
> select="marc:controlfield[@tag=008]"/>
> 
> Should this be happening?

Yes. Thanks for your watchfulness. 'leader' is used by MARC21 to DC XSL to display document type. It doesn't work this way for UNIMARC.
Comment 14 Chris Cormack 2011-12-19 08:23:33 UTC
Cool, It all looks good then, signing off
Comment 15 Chris Cormack 2011-12-19 08:23:54 UTC
Created attachment 6863 [details] [review]
Bug 5565 UNIMARC to DC XSL tidy up

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 16 Ian Walls 2011-12-21 22:44:40 UTC
XSLT and whitespace clean up only.  Easy to read, marking Passed QA
Comment 17 Paul Poulain 2011-12-27 17:34:20 UTC
patch pushed, please test