version 1.3, 2002/05/11 21:04:27
|
version 1.4, 2002/05/11 23:22:49
|
Line 45 END
|
Line 45 END
|
#http://www.openarchives.org/OAI/openarchivesprotocol.html |
#http://www.openarchives.org/OAI/openarchivesprotocol.html |
# "> |
# "> |
|
|
|
my $namespace='http://ExternalFunction/'; |
|
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/" |
Line 194 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 205 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> |