--- nsdl/prototypes/metadata_convert.pl 2002/05/11 20:20:32 1.2 +++ nsdl/prototypes/metadata_convert.pl 2002/05/11 23:22:49 1.4 @@ -44,12 +44,22 @@ END #http://www.dlib.vt.edu/projects/OAi/marcxml/marcxml.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 -# http://www.openarchives.org/OAI/1.1/dc.xsd"> + +my $namespace='http://ExternalFunction/'; +my $func = sub { + my $text = shift; + return uc($text); +}; + +$tr->install_function($namespace, 'plain-text', $func); + + my $NSDL_metadata1=(< - + The Cornell Law Quarterly 1915-1916 http://heinonline.org/HeinOnline/show.pl? @@ -193,7 +203,10 @@ close(OUT); open(OUT,'>tmpn2l.xsl'); print(OUT < - + @@ -204,7 +217,16 @@ print(OUT < -<xsl:value-of select="."/> + + <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> +