Changeset 20857


Ignore:
Timestamp:
10/29/09 14:55:53 (12 years ago)
Author:
mdewsnip
Message:

Added xmlns="http://www.loc.gov/MARC21/slim" to the <collection> element, so the MARC XML files are better XML and can be opened in the Marc Edit program.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/etc/dc2marc.xsl

    r15016 r20857  
    99
    1010  <xsl:template match="/">
    11      <collection>
     11     <collection xmlns="http://www.loc.gov/MARC21/slim">
    1212           <xsl:apply-templates select="/MARCXML/MetadataList"/>
    1313      </collection>
     
    3535       </xsl:variable> 
    3636      <xsl:variable name="item" select="$mapping/stopwords[@lang=$lang]/item"/>
    37       <record>
     37      <record xmlns="http://www.loc.gov/MARC21/slim">
    3838      <xsl:apply-templates select="$mapping/leader">
    3939         <xsl:with-param name="source" select="." />   
     
    4949  <xsl:template match="leader">
    5050     <xsl:param  name="source" />   
    51       <leader>
     51      <leader xmlns="http://www.loc.gov/MARC21/slim">
    5252         <xsl:for-each select="*">
    5353           <xsl:choose>
     
    106106 
    107107  <xsl:template match="controlfield">
    108      <controlfield tag="{@tag}"><xsl:value-of select="@value"/></controlfield> 
     108     <controlfield tag="{@tag}" xmlns="http://www.loc.gov/MARC21/slim"><xsl:value-of select="@value"/></controlfield> 
    109109  </xsl:template>
    110110 
     
    152152     <xsl:choose>     
    153153       <xsl:when test="count($source/Metadata[@name=$meta]) >0">
    154           <datafield>
     154          <datafield xmlns="http://www.loc.gov/MARC21/slim">
    155155             <xsl:apply-templates select="../@*" mode="mapping-attribute">
    156156               <xsl:with-param name="source" select="$source"/>
     
    267267      <xsl:choose>
    268268        <xsl:when test="@nonfiling='true'">
    269           <subfield code="{@code}"><xsl:value-of select="$content"/><xsl:value-of select="@punc"/></subfield>
     269          <subfield code="{@code}" xmlns="http://www.loc.gov/MARC21/slim"><xsl:value-of select="$content"/><xsl:value-of select="@punc"/></subfield>
    270270        </xsl:when>
    271271        <xsl:when test="$pos >0">
    272            <subfield code="{@code}">
     272           <subfield code="{@code}" xmlns="http://www.loc.gov/MARC21/slim">
    273273                <xsl:value-of select="$source/Metadata[@name=$meta][$pos]"/><xsl:value-of select="$punc"/>
    274274           </subfield>
    275275        </xsl:when>
    276276        <xsl:otherwise>
    277            <subfield code="{@code}">
     277           <subfield code="{@code}" xmlns="http://www.loc.gov/MARC21/slim">
    278278                <xsl:value-of select="$source/Metadata[@name=$meta]"/><xsl:value-of select="$punc"/>
    279279           </subfield>
Note: See TracChangeset for help on using the changeset viewer.