Diff for /nsdl/prototypes/metadata_convert.pl between versions 1.2 and 1.4

version 1.2, 2002/05/11 20:20:32 version 1.4, 2002/05/11 23:22:49
Line 44  END Line 44  END
 #http://www.dlib.vt.edu/projects/OAi/marcxml/marcxml.html  #http://www.dlib.vt.edu/projects/OAi/marcxml/marcxml.html
 #http://www.openarchives.org/OAI/openarchivesprotocol.html  #http://www.openarchives.org/OAI/openarchivesprotocol.html
 # ">  # ">
 #     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
 #     xsi:schemaLocation="http://purl.org/dc/elements/1.1  my $namespace='http://ExternalFunction/';
 #     http://www.openarchives.org/OAI/1.1/dc.xsd">  my $func = sub {
       my $text = shift;
       return uc($text);
   };
   
   $tr->install_function($namespace, 'plain-text', $func);
   
   
 my $NSDL_metadata1=(<<END);  my $NSDL_metadata1=(<<END);
 <?xml version="1.0"?>  <?xml version="1.0"?>
 <dc xmlns="http://purl.org/dc/elements/1.1/">  <dc xmlns="http://purl.org/dc/elements/1.1/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://purl.org/dc/elements/1.1
        http://www.openarchives.org/OAI/1.1/dc.xsd">
 <title>The Cornell Law Quarterly</title>  <title>The Cornell Law Quarterly</title>
 <date>1915-1916</date>  <date>1915-1916</date>
 <identifier>http://heinonline.org/HeinOnline/show.pl?  <identifier>http://heinonline.org/HeinOnline/show.pl?
Line 193  close(OUT); Line 203  close(OUT);
 open(OUT,'>tmpn2l.xsl');  open(OUT,'>tmpn2l.xsl');
 print(OUT <<END);  print(OUT <<END);
 <?xml version="1.0"?>   <?xml version="1.0"?> 
 <xsl:stylesheet xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">  <xsl:stylesheet
     xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
     xmlns:external="$namespace"
   >
 <xsl:template match="/">  <xsl:template match="/">
 <loncapa>  <loncapa>
 <xsl:text>  <xsl:text>
Line 204  print(OUT <<END); Line 217  print(OUT <<END);
 </xsl:text>  </xsl:text>
 </xsl:template>  </xsl:template>
 <xsl:template match="dc:title">  <xsl:template match="dc:title">
 <title><xsl:value-of select="."/></title>  <title>
            <xsl:choose>
              <xsl:when test="function-available('external:plain-text')">
                <xsl:value-of select="external:plain-text(.)"/>
              </xsl:when>
              <xsl:otherwise>
                Function external:plain-text() is not available!
              </xsl:otherwise>
            </xsl:choose>
   </title>
 <xsl:text>  <xsl:text>
 </xsl:text>  </xsl:text>
 </xsl:template>  </xsl:template>

Removed from v.1.2  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>