<?xml version="1.0"?>
<xslt:stylesheet xmlns:mxch="info:lc/xmlns/marcxchange-v1" xmlns:ac="http://biblstandard.dk/ac/namespace/" xmlns:dkabm="http://biblstandard.dk/abm/namespace/dkabm/" xmlns:dkdcplus="http://biblstandard.dk/abm/namespace/dkdcplus/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" version="1.0" xsi:schemaLocation="http://biblstandard.dk/abm/namespace/dkabm/ http://biblstandard.dk/abm/schemas/dkabm_2008-11-19.xsd" exclude-result-prefixes="mxch">
  <xslt:template name="print_subfields">
    <xslt:param name="codes"/>
    <xslt:variable name="value">
      <xslt:for-each select="mxch:subfield">
        <xslt:if test="contains($codes, @code)">
          <xslt:value-of select="."/>
          <xslt:value-of select="' '"/>
        </xslt:if>
      </xslt:for-each>
    </xslt:variable>
    <xslt:value-of select="translate(substring($value, 1, string-length($value) - 1),                                '&#xA4;', '')"/>
  </xslt:template>
  <xslt:template match="mxch:datafield[@tag=001]">
    <ac:identifier>
      <xslt:for-each select="mxch:subfield[@code = 'b']">
        <xslt:value-of select="."/>
        <xslt:text>|</xslt:text>
      </xslt:for-each>
      <xslt:value-of select="mxch:subfield[@code = 'a']"/>
    </ac:identifier>
    <ac:source>
      <xslt:value-of select="mxch:subfield[@code = 'b']"/>
    </ac:source>
    <ac:location>
      <xslt:value-of select="$url_base"/>
      <xslt:value-of select="$url_start"/>
      <xslt:value-of select="mxch:subfield[@code = 'a']"/>
      <xslt:value-of select="$url_middle"/>
      <xslt:value-of select="mxch:subfield[@code = 'b']"/>
      <xslt:value-of select="$url_end"/>
    </ac:location>
  </xslt:template>
  <xslt:template name="marc_rules">
    <xslt:for-each select="mxch:datafield">
      <xslt:if test="@tag=245">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aøæcnoxg</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:title>
            <xslt:value-of select="$content"/>
          </dc:title>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=248">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">gac</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:title>
            <xslt:value-of select="$content"/>
          </dc:title>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=440">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aøæv</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:title>
            <xslt:value-of select="$content"/>
          </dc:title>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=840">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aøæv</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:alternative>
            <xslt:value-of select="$content"/>
          </dcterms:alternative>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=245">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">pqrs</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:alternative>
            <xslt:value-of select="$content"/>
          </dcterms:alternative>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=745">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ia</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:alternative>
            <xslt:value-of select="$content"/>
          </dcterms:alternative>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=100">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ahefc</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:creator>
            <xslt:value-of select="$content"/>
          </dc:creator>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=110">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">asecikj</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:creator>
            <xslt:value-of select="$content"/>
          </dc:creator>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=700">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ahefc</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:creator>
            <xslt:value-of select="$content"/>
          </dc:creator>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=710">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">asecikj</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:creator>
            <xslt:value-of select="$content"/>
          </dc:creator>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=720">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ahko</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:creator>
            <xslt:value-of select="$content"/>
          </dc:creator>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=600">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ahefc</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject>
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=610">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">asecikj</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject>
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=630">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">abfgstu</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject>
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=631">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">abfgst8</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject>
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=645">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">abcu</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject>
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=652">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">mo</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject xsi:type="dkdcplus:DK5">
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ft</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject xsi:type="dkdcplus:DBCF">
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">sr</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject xsi:type="dkdcplus:DBCS">
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">mnpl</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject xsi:type="dkdcplus:DBCM">
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">o</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject xsi:type="dkdcplus:DBCO">
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">u</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:subject xsi:type="dkdcplus:DBCN">
            <xslt:value-of select="$content"/>
          </dc:subject>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=504">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">a</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:description>
            <xslt:value-of select="$content"/>
          </dc:description>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=507">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">a</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:description>
            <xslt:value-of select="$content"/>
          </dc:description>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=512">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aitedxbuy</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:description>
            <xslt:value-of select="$content"/>
          </dc:description>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=517">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">abcd</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:description>
            <xslt:value-of select="$content"/>
          </dc:description>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=530">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aitedxmbuyz</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:description>
            <xslt:value-of select="$content"/>
          </dc:description>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=534">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aitedxbuy</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:description>
            <xslt:value-of select="$content"/>
          </dc:description>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=559">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">a</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:description>
            <xslt:value-of select="$content"/>
          </dc:description>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=250">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ax</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dkdcplus:version>
            <xslt:value-of select="$content"/>
          </dkdcplus:version>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=260">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ab</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:publisher>
            <xslt:value-of select="$content"/>
          </dc:publisher>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=440">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">e</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:publisher>
            <xslt:value-of select="$content"/>
          </dc:publisher>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=513">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aefij</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:contributor>
            <xslt:value-of select="$content"/>
          </dc:contributor>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=008">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">az</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:date>
            <xslt:value-of select="$content"/>
          </dc:date>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=260">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">c</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:date>
            <xslt:value-of select="$content"/>
          </dc:date>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=300">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">nade</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:format>
            <xslt:value-of select="$content"/>
          </dc:format>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=501">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">iab</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:format>
            <xslt:value-of select="$content"/>
          </dc:format>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=021">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ae</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier xsi:type="dkdcplus:ISBN">
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=248">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">zr</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier xsi:type="dkdcplus:ISBN">
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=022">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">a</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier xsi:type="dkdcplus:ISSN">
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=028">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">a</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier>
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=440">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">z</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier xsi:type="dkdcplus:ISSN">
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=840">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">z</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier xsi:type="dkdcplus:ISSN">
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=538">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">bfg</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier>
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=248">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">u</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier>
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=856">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">u</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:identifier xsi:type="dkdcplus:URI">
            <xslt:value-of select="$content"/>
          </dc:identifier>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=241">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">a</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:source>
            <xslt:value-of select="$content"/>
          </dc:source>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=526">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">u</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:isPartOf xsi:type="dkdcplus:URI">
            <xslt:value-of select="$content"/>
          </dcterms:isPartOf>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=557">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">avkhij</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:isPartOf>
            <xslt:value-of select="$content"/>
          </dcterms:isPartOf>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=558">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">aeghij</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:isPartOf>
            <xslt:value-of select="$content"/>
          </dcterms:isPartOf>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=557">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">z</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:isPartOf xsi:type="dkdcplus:ISSN">
            <xslt:value-of select="$content"/>
          </dcterms:isPartOf>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=558">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">rz</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:isPartOf xsi:type="dkdcplus:ISBN">
            <xslt:value-of select="$content"/>
          </dcterms:isPartOf>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=860">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">it</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:replaces>
            <xslt:value-of select="$content"/>
          </dcterms:replaces>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=861">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">it</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:isReplacedBy>
            <xslt:value-of select="$content"/>
          </dcterms:isReplacedBy>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=633">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">au</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:spatial xsi:type="dkdcplus:DBCL">
            <xslt:value-of select="$content"/>
          </dcterms:spatial>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=634">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">abcdu</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:temporal xsi:type="dkdcplus:DBCP">
            <xslt:value-of select="$content"/>
          </dcterms:temporal>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">e</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:spatial xsi:type="dkdcplus:DBCF">
            <xslt:value-of select="$content"/>
          </dcterms:spatial>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">q</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:spatial xsi:type="dkdcplus:DBCS">
            <xslt:value-of select="$content"/>
          </dcterms:spatial>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=666">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">i</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dcterms:temporal>
            <xslt:value-of select="$content"/>
          </dcterms:temporal>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=518">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">a</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:rights>
            <xslt:value-of select="$content"/>
          </dc:rights>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=008">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">n</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <dc:rights xsi:type="ac:RightsList">
            <xslt:choose>
               <xslt:when test="$content = 'a'">
                  <xslt:text>AccessUnrestricted</xslt:text>
               </xslt:when>
               <xslt:when test="$content = 'b'">
                  <xslt:text>AccessRestricted</xslt:text>
               </xslt:when>
               <xslt:when test="$content = 'c'">
                  <xslt:text>AccessNo</xslt:text>
               </xslt:when>
               <xslt:otherwise>
                  <xslt:value-of select="$content"/>
               </xslt:otherwise>
            </xslt:choose>
          </dc:rights>
        </xslt:if>
      </xslt:if>
      <xslt:if test="@tag=032">
        <xslt:variable name="content">
          <xslt:call-template name="print_subfields">
            <xslt:with-param name="codes">ax</xslt:with-param>
          </xslt:call-template>
        </xslt:variable>
        <xslt:if test="string-length($content) &gt; 0">
          <ac:scope xsi:type="dkdcplus:CatCode">
            <xslt:value-of select="$content"/>
          </ac:scope>
        </xslt:if>
      </xslt:if>
    </xslt:for-each>
  </xslt:template>
</xslt:stylesheet>

