[Koha-bugs] [Bug 6681] When importing a biblio record via Z39.50, authority links and items also get imported

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 10 00:30:27 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6681

--- Comment #22 from David Cook <dcook at prosentient.com.au> ---
Comment on attachment 33177
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33177
Bug 6681: introduce XSLT scripts to remove items and links

Review of attachment 33177:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=6681&attachment=33177)
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl
@@ +1,5 @@
> +<xsl:stylesheet
> +  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> +  xmlns:marc="http://www.loc.gov/MARC21/slim"
> +  version="1.0">
> +

<!-- This XSLT is intended for use when importing records via Z39.50 -->

@@ +4,5 @@
> +  version="1.0">
> +
> +  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
> +  <xsl:strip-space elements="*"/>
> +

This template matches datafields with the 952 tag. As it provides no specific
instructions for how to output this input, the datafield will be deleted from
the output.

@@ +6,5 @@
> +  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
> +  <xsl:strip-space elements="*"/>
> +
> +  <xsl:template match="marc:datafield[@tag=952]"/>
> +

The following template is an "Identity Transform" which will copy all
attributes and nodes from the input to the output. Without this template, the
output will just be a text document with no XML tags.

::: koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl
@@ +1,5 @@
> +<xsl:stylesheet
> +  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> +  xmlns:marc="http://www.loc.gov/MARC21/slim"
> +  version="1.0">
> +

<!-- This XSLT is intended for use when importing records via Z39.50 -->

@@ +4,5 @@
> +  version="1.0">
> +
> +  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
> +  <xsl:strip-space elements="*"/>
> +

This template matches datafields with the 995 tag. As it provides no specific
instructions for how to output this input, the datafield will be deleted from
the output.

@@ +6,5 @@
> +  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
> +  <xsl:strip-space elements="*"/>
> +
> +  <xsl:template match="marc:datafield[@tag=995]"/>
> +

The following template is an "Identity Transform" which will copy all
attributes and nodes from the input to the output. Without this template, the
output will just be a text document with no XML tags.

::: koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept952.xsl
@@ +1,4 @@
> +<xsl:stylesheet
> +  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> +  xmlns:marc="http://www.loc.gov/MARC21/slim"
> +  version="1.0">

<!-- This XSLT is intended for use when importing records via Z39.50 -->

@@ +4,5 @@
> +  version="1.0">
> +
> +  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
> +  <xsl:strip-space elements="*"/>
> +

The following template is an "Identity Transform" which will copy all
attributes and nodes from the input to the output. Without this template, the
output will just be a text document with no XML tags.

@@ +10,5 @@
> +    <xsl:copy>
> +      <xsl:apply-templates select="@* | node()"/>
> +    </xsl:copy>
> +  </xsl:template>
> +

The following template will match every datafield which contains a subfield
with a code of 9, except those datafields that have a tag of 952. Since it has
no output instructions, this datafield will be deleted from the output.

It's important to delete the subfield with a code of 9, since this subfield
contains links to authority records, which will most likely not link correctly
in Koha when importing from Z39.50.

::: koha-tmpl/intranet-tmpl/prog/en/xslt/Del9LinksExcept995.xsl
@@ +1,5 @@
> +<xsl:stylesheet
> +  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> +  xmlns:marc="http://www.loc.gov/MARC21/slim"
> +  version="1.0">
> +

<!-- This XSLT is intended for use when importing records via Z39.50 -->

@@ +4,5 @@
> +  version="1.0">
> +
> +  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
> +  <xsl:strip-space elements="*"/>
> +

The following template is an "Identity Transform" which will copy all
attributes and nodes from the input to the output. Without this template, the
output will just be a text document with no XML tags.

@@ +10,5 @@
> +    <xsl:copy>
> +      <xsl:apply-templates select="@* | node()"/>
> +    </xsl:copy>
> +  </xsl:template>
> +

The following template will match every datafield which contains a subfield
with a code of 9, except those datafields that have a tag of 995. Since it has
no output instructions, this datafield will be deleted from the output.

It's important to delete the subfield with a code of 9, since this subfield
contains links to authority records, which will most likely not link correctly
in Koha when importing from Z39.50.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list