Microformat support:

Needed to restore OpenSearch capabilities, and did the following while
I was at it:

  * add support for unAPI: http://unapi.info/
  * add basic support for COinS and OpenURL:
    http://ocoins.info;
    http://www.niso.org/committees/committee_ax.html
  * ^^ Gives us Zotero Support!
  * adding some XSLT stylesheets for handling additional transformations
    NOTE: English and MARC21 specific unfortunately
  * adding back opensearch/rss feed <link>s for autodiscovery

TODO: after the installation, to get the Zebra system running on an external
port it's necessary to hand-edit the configs. I'm looking into Virtual Hosts
which could solve that problem (run on both the socket and a port).

Need to add better error handling to the unapi and opensearch scripts

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Joshua Ferraro 2008-01-03 17:50:45 -06:00
parent 185fb34c11
commit 030fbd2e80
15 changed files with 7118 additions and 12 deletions

View File

@ -48,6 +48,13 @@
<xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
</backend>
</retrieval>
<retrieval syntax="xml" name="rss2">
<backend syntax="usmarc" name="F">
<marc inputformat="marc" outputformat="marcxml"
inputcharset="utf-8"/>
<xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RSS2.xsl"/>
</backend>
</retrieval>
<retrieval syntax="xml" name="utils">
<backend syntax="usmarc" name="F">
<marc inputformat="marc" outputformat="marcxml"

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes"/>
<!--Added ISBN and deleted attributes 6/04 jer-->
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
<entry xmlns="http://www.w3.org/2005/Atom">
<xsl:for-each select="marc:controlfield[@tag=001]">
<id>
<xsl:text>urn:tcn:</xsl:text>
<xsl:value-of select="."/>
</id>
</xsl:for-each>
<xsl:for-each select="marc:controlfield[@tag=005]">
<updated>
<xsl:value-of select="."/>
</updated>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=245]">
<title>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abfghk</xsl:with-param>
</xsl:call-template>
</title>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=100]">
<author>
<name>
<xsl:value-of select="."/>
</name>
</author>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">
<author>
<name>
<xsl:value-of select="."/>
</name>
</author>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=655]">
<category>
<xsl:attribute name="term">
<xsl:value-of select="./marc:subfield[@code='a' or @code='v']"/>
</xsl:attribute>
</category>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]">
<rights type="html">
<xsl:text>&#169; </xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">c</xsl:with-param>
</xsl:call-template>
<xsl:text>, </xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">b</xsl:with-param>
</xsl:call-template>
</rights>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
<published>
<xsl:value-of select="."/>
</published>
</xsl:for-each>
<xsl:for-each select="marc:datafield[500&lt;@tag][@tag&lt;=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
<summary>
<xsl:value-of select="marc:subfield[@code='a']"/>
</summary>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=600 or @tag=610 or @tag=611 or @tag=630 or @tag=650 or @tag=653]">
<category>
<xsl:attribute name="term">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</xsl:attribute>
</category>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=856]">
<dc:identifier>
<xsl:value-of select="marc:subfield[@code='u']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=020]">
<dc:identifier>
<xsl:text>URN:ISBN:</xsl:text>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=506]">
<rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</rights>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=540]">
<rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</rights>
</xsl:for-each>
</entry>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes"/>
<!--Added ISBN and deleted attributes 6/04 jer-->
<xsl:template match="/">
<xsl:if test="marc:collection">
<oai_dc:dcCollection xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<xsl:for-each select="marc:collection">
<xsl:for-each select="marc:record">
<oai_dc:dc>
<xsl:apply-templates select="."/>
</oai_dc:dc>
</xsl:for-each>
</xsl:for-each>
</oai_dc:dcCollection>
</xsl:if>
<xsl:if test="marc:record">
<oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<xsl:apply-templates/>
</oai_dc:dc>
</xsl:if>
</xsl:template>
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
<xsl:for-each select="marc:datafield[@tag=245]">
<dc:title>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abfghk</xsl:with-param>
</xsl:call-template>
</dc:title>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=100]|marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">
<dc:creator>
<xsl:value-of select="."/>
</dc:creator>
</xsl:for-each>
<dc:type>
<xsl:if test="$leader7='c'">
<!--Remove attribute 6/04 jer-->
<!--<xsl:attribute name="collection">yes</xsl:attribute>-->
<xsl:text>collection</xsl:text>
</xsl:if>
<xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
<!--Remove attribute 6/04 jer-->
<!--<xsl:attribute name="manuscript">yes</xsl:attribute>-->
<xsl:text>manuscript</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
<xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
<xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
<xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
<xsl:when test="$leader6='k'">still image</xsl:when>
<xsl:when test="$leader6='g'">moving image</xsl:when>
<xsl:when test="$leader6='r'">three dimensional object</xsl:when>
<xsl:when test="$leader6='m'">software, multimedia</xsl:when>
<xsl:when test="$leader6='p'">mixed material</xsl:when>
</xsl:choose>
</dc:type>
<xsl:for-each select="marc:datafield[@tag=655]">
<dc:type>
<xsl:value-of select="."/>
</dc:type>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]">
<dc:publisher>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ab</xsl:with-param>
</xsl:call-template>
</dc:publisher>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
<dc:date>
<xsl:value-of select="."/>
</dc:date>
</xsl:for-each>
<dc:language>
<xsl:value-of select="substring($controlField008,36,3)"/>
</dc:language>
<xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
<dc:format>
<xsl:value-of select="."/>
</dc:format>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=520]">
<dc:description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=521]">
<dc:description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[500&lt;@tag][@tag&lt;=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
<dc:description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=600]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=610]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=611]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=630]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=650]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=653]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=752]">
<dc:coverage>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcd</xsl:with-param>
</xsl:call-template>
</dc:coverage>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=530]">
<dc:relation type="original">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdu</xsl:with-param>
</xsl:call-template>
</dc:relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]|marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=770]|marc:datafield[@tag=772]|marc:datafield[@tag=773]|marc:datafield[@tag=774]|marc:datafield[@tag=775]|marc:datafield[@tag=776]|marc:datafield[@tag=777]|marc:datafield[@tag=780]|marc:datafield[@tag=785]|marc:datafield[@tag=786]|marc:datafield[@tag=787]">
<dc:relation>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ot</xsl:with-param>
</xsl:call-template>
</dc:relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=856]">
<dc:identifier>
<xsl:value-of select="marc:subfield[@code='u']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=020]">
<dc:identifier>
<xsl:text>URN:ISBN:</xsl:text>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=506]">
<dc:rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:rights>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=540]">
<dc:rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:rights>
</xsl:for-each>
<!--</oai_dc:dc>-->
</xsl:template>
</xsl:stylesheet>
<!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->

View File

@ -0,0 +1,211 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes"/>
<!--Added ISBN and deleted attributes 6/04 jer-->
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
<rdf:Description>
<xsl:for-each select="marc:datafield[@tag=245]">
<dc:title>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abfghk</xsl:with-param>
</xsl:call-template>
</dc:title>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=100]|marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">
<dc:creator>
<xsl:value-of select="."/>
</dc:creator>
</xsl:for-each>
<dc:type>
<xsl:if test="$leader7='c'">
<xsl:text>collection</xsl:text>
<!--Removed attributes 6/04 jer-->
<!--<xsl:attribute name="collection">yes</xsl:attribute>-->
</xsl:if>
<xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
<!--Removed attributes 6/04 jer-->
<!--<xsl:attribute name="manuscript">yes</xsl:attribute>-->
<xsl:text>manuscript</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
<xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
<xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
<xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
<xsl:when test="$leader6='k'">still image</xsl:when>
<xsl:when test="$leader6='g'">moving image</xsl:when>
<xsl:when test="$leader6='r'">three dimensional object</xsl:when>
<xsl:when test="$leader6='m'">software, multimedia</xsl:when>
<xsl:when test="$leader6='p'">mixed material</xsl:when>
</xsl:choose>
</dc:type>
<xsl:for-each select="marc:datafield[@tag=655]">
<dc:type>
<xsl:value-of select="."/>
</dc:type>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]">
<dc:publisher>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ab</xsl:with-param>
</xsl:call-template>
</dc:publisher>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
<dc:date>
<xsl:value-of select="."/>
</dc:date>
</xsl:for-each>
<dc:language>
<xsl:value-of select="substring($controlField008,36,3)"/>
</dc:language>
<xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
<dc:format>
<xsl:value-of select="."/>
</dc:format>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=520]">
<dc:description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=521]">
<dc:description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[500&lt;@tag][@tag&lt;=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
<dc:description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=600]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=610]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=611]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=630]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=650]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=653]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=752]">
<dc:coverage>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcd</xsl:with-param>
</xsl:call-template>
</dc:coverage>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=530]">
<dc:relation type="original">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdu</xsl:with-param>
</xsl:call-template>
</dc:relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]|marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=770]|marc:datafield[@tag=772]|marc:datafield[@tag=773]|marc:datafield[@tag=774]|marc:datafield[@tag=775]|marc:datafield[@tag=776]|marc:datafield[@tag=777]|marc:datafield[@tag=780]|marc:datafield[@tag=785]|marc:datafield[@tag=786]|marc:datafield[@tag=787]">
<dc:relation>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ot</xsl:with-param>
</xsl:call-template>
</dc:relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=856]">
<dc:identifier>
<xsl:value-of select="marc:subfield[@code='u']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=020]">
<dc:identifier>
<xsl:text>URN:ISBN:</xsl:text>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=506]">
<dc:rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:rights>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=540]">
<dc:rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:rights>
</xsl:for-each>
</rdf:Description>
</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="RDF" userelativepaths="yes" externalpreview="no" url="marcxmlfile.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->

View File

@ -0,0 +1,205 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils2.xsl"/>
<xsl:output method="xml" indent="yes"/>
<!--Added ISBN and deleted attributes 6/04 jer-->
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
<item>
<xsl:for-each select="marc:datafield[@tag=245]">
<title>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abfghk</xsl:with-param>
</xsl:call-template>
</title>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=100]">
<author>
<xsl:value-of select="."/>
</author>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">
<dc:creator>
<xsl:value-of select="."/>
</dc:creator>
</xsl:for-each>
<dc:type>
<xsl:if test="$leader7='c'">
<xsl:text>collection</xsl:text>
<!--Removed attributes 6/04 jer-->
<!--<xsl:attribute name="collection">yes</xsl:attribute>-->
</xsl:if>
<xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
<!--Removed attributes 6/04 jer-->
<!--<xsl:attribute name="manuscript">yes</xsl:attribute>-->
<xsl:text>manuscript</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
<xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
<xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
<xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
<xsl:when test="$leader6='k'">still image</xsl:when>
<xsl:when test="$leader6='g'">moving image</xsl:when>
<xsl:when test="$leader6='r'">three dimensional object</xsl:when>
<xsl:when test="$leader6='m'">software, multimedia</xsl:when>
<xsl:when test="$leader6='p'">mixed material</xsl:when>
</xsl:choose>
</dc:type>
<xsl:for-each select="marc:datafield[@tag=655]">
<category>
<xsl:value-of select="."/>
</category>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]">
<dc:publisher>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ab</xsl:with-param>
</xsl:call-template>
</dc:publisher>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
<pubDate>
<xsl:value-of select="."/>
</pubDate>
</xsl:for-each>
<dc:language>
<xsl:value-of select="substring($controlField008,36,3)"/>
</dc:language>
<xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
<dc:format>
<xsl:value-of select="."/>
</dc:format>
</xsl:for-each>
<xsl:for-each select="marc:datafield[500&lt;@tag][@tag&lt;=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
<description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=600]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=610]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=611]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=630]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=650]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=653]">
<dc:subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdq</xsl:with-param>
</xsl:call-template>
</dc:subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=752]">
<dc:coverage>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcd</xsl:with-param>
</xsl:call-template>
</dc:coverage>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=530]">
<dc:relation type="original">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdu</xsl:with-param>
</xsl:call-template>
</dc:relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]|marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=770]|marc:datafield[@tag=772]|marc:datafield[@tag=773]|marc:datafield[@tag=774]|marc:datafield[@tag=775]|marc:datafield[@tag=776]|marc:datafield[@tag=777]|marc:datafield[@tag=780]|marc:datafield[@tag=785]|marc:datafield[@tag=786]|marc:datafield[@tag=787]">
<dc:relation>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ot</xsl:with-param>
</xsl:call-template>
</dc:relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=856]">
<dc:identifier>
<xsl:value-of select="marc:subfield[@code='u']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=020]">
<dc:identifier>
<xsl:text>URN:ISBN:</xsl:text>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=506]">
<dc:rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:rights>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=540]">
<dc:rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</dc:rights>
</xsl:for-each>
</item>
</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="RDF" userelativepaths="yes" externalpreview="no" url="marcxmlfile.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->

View File

@ -0,0 +1,260 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:srw_dc="info:srw/schema/1/dc-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<!-- modification log
NT 01/04: added collection level element
and removed attributes
JR 06/04: Added ISBN identifier
JR 09/05: Added additional <subject> subfields and 651 for <coverage>
RG 10/07/05: Corrected subject subfields; 10/12/05: added if statement for <language>
-->
<xsl:template match="/">
<xsl:if test="marc:collection">
<srw_dc:dcCollection xmlns:srw_dc="info:srw/schema/1/dc-schema" xsi:schemaLocation="info:srw/schema/1/dc-schema http://www.loc.gov/z3950/agency/zing/srw/dc-schema.xsd">
<xsl:for-each select="marc:collection">
<xsl:for-each select="marc:record">
<srw_dc:dc>
<xsl:apply-templates select="."/>
</srw_dc:dc>
</xsl:for-each>
</xsl:for-each>
</srw_dc:dcCollection>
</xsl:if>
<xsl:if test="marc:record">
<srw_dc:dc xmlns:srw_dc="info:srw/schema/1/dc-schema" xsi:schemaLocation="info:srw/schema/1/dc-schema http://www.loc.gov/z3950/agency/zing/srw/dc-schema.xsd">
<xsl:apply-templates select="marc:record"/>
</srw_dc:dc>
</xsl:if>
</xsl:template>
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
<xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
<xsl:for-each select="marc:datafield[@tag=245]">
<title>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abfghk</xsl:with-param>
</xsl:call-template>
</title>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=100]|marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">
<creator>
<xsl:value-of select="normalize-space(.)"/>
</creator>
</xsl:for-each>
<type>
<xsl:if test="$leader7='c'">
<!-- nt fix 1/04 -->
<!--<xsl:attribute name="collection">yes</xsl:attribute>-->
<xsl:text>collection</xsl:text>
</xsl:if>
<xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
<!-- nt fix 1/04 -->
<!--<xsl:attribute name="manuscript">yes</xsl:attribute> -->
<xsl:text>manuscript</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
<xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
<xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
<xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
<xsl:when test="$leader6='k'">still image</xsl:when>
<xsl:when test="$leader6='g'">moving image</xsl:when>
<xsl:when test="$leader6='r'">three dimensional object</xsl:when>
<xsl:when test="$leader6='m'">software, multimedia</xsl:when>
<xsl:when test="$leader6='p'">mixed material</xsl:when>
</xsl:choose>
</type>
<xsl:for-each select="marc:datafield[@tag=655]">
<type>
<xsl:value-of select="normalize-space(.)"/>
</type>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]">
<publisher>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ab</xsl:with-param>
</xsl:call-template>
</publisher>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
<date>
<xsl:value-of select="."/>
</date>
</xsl:for-each>
<xsl:if test="substring($controlField008,36,3)">
<language>
<xsl:value-of select="substring($controlField008,36,3)"/>
</language>
</xsl:if>
<xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
<format>
<xsl:value-of select="."/>
</format>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=520]">
<description>
<!-- nt fix 01/04 -->
<xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
</description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=521]">
<description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[500&lt;@tag][@tag&lt;=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
<description>
<xsl:value-of select="marc:subfield[@code='a']"/>
</description>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=600]">
<subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdefghjklmnopqrstu4</xsl:with-param>
</xsl:call-template>
<xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
<xsl:text>--</xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">vxyz</xsl:with-param>
<xsl:with-param name="delimeter">--</xsl:with-param>
</xsl:call-template>
</xsl:if>
</subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=610]">
<subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdefghklmnoprstu4</xsl:with-param>
</xsl:call-template>
<xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
@code='z']">
<xsl:text>--</xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">vxyz</xsl:with-param>
<xsl:with-param name="delimeter">--</xsl:with-param>
</xsl:call-template>
</xsl:if>
</subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=611]">
<subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">acdefghklnpqstu4</xsl:with-param>
</xsl:call-template>
<xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
@code='z']">
<xsl:text>--</xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">vxyz</xsl:with-param>
<xsl:with-param name="delimeter">--</xsl:with-param>
</xsl:call-template>
</xsl:if>
</subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=630]">
<subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">adfghklmnoprst</xsl:with-param>
</xsl:call-template>
<xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
@code='z']">
<xsl:text>--</xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">vxyz</xsl:with-param>
<xsl:with-param name="delimeter">--</xsl:with-param>
</xsl:call-template>
</xsl:if>
</subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=650]">
<subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ae</xsl:with-param></xsl:call-template>
<xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
@code='z']">
<xsl:text>--</xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">vxyz</xsl:with-param>
<xsl:with-param name="delimeter">--</xsl:with-param>
</xsl:call-template>
</xsl:if>
</subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=653]">
<subject>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
</xsl:call-template>
</subject>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=651]">
<coverage>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
</xsl:call-template>
<xsl:if test="marc:subfield[@code='v' or @code='x' or @code='y' or
@code='z']">
<xsl:text>--</xsl:text>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">vxyz</xsl:with-param>
<xsl:with-param name="delimeter">--</xsl:with-param>
</xsl:call-template>
</xsl:if>
</coverage>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=752]">
<coverage>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcd</xsl:with-param>
</xsl:call-template>
</coverage>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=530]">
<!-- nt 01/04 attribute fix -->
<relation>
<!--<xsl:attribute name="type">original</xsl:attribute>-->
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">abcdu</xsl:with-param>
</xsl:call-template>
</relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]|marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=770]|marc:datafield[@tag=772]|marc:datafield[@tag=773]|marc:datafield[@tag=774]|marc:datafield[@tag=775]|marc:datafield[@tag=776]|marc:datafield[@tag=777]|marc:datafield[@tag=780]|marc:datafield[@tag=785]|marc:datafield[@tag=786]|marc:datafield[@tag=787]">
<relation>
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">ot</xsl:with-param>
</xsl:call-template>
</relation>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=856]">
<identifier>
<xsl:value-of select="marc:subfield[@code='u']"/>
</identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=020]">
<identifier>
<xsl:text>URN:ISBN:</xsl:text>
<xsl:value-of select="marc:subfield[@code='a']"/>
</identifier>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=506]">
<rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</rights>
</xsl:for-each>
<xsl:for-each select="marc:datafield[@tag=540]">
<rights>
<xsl:value-of select="marc:subfield[@code='a']"/>
</rights>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
<!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->

View File

@ -0,0 +1,79 @@
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- 8/19/04: ntra added "marc:" prefix to datafield element -->
<xsl:template name="datafield">
<xsl:param name="tag"/>
<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
<xsl:param name="ind2"><xsl:text> </xsl:text></xsl:param>
<xsl:param name="subfields"/>
<xsl:element name="marc:datafield">
<xsl:attribute name="tag">
<xsl:value-of select="$tag"/>
</xsl:attribute>
<xsl:attribute name="ind1">
<xsl:value-of select="$ind1"/>
</xsl:attribute>
<xsl:attribute name="ind2">
<xsl:value-of select="$ind2"/>
</xsl:attribute>
<xsl:copy-of select="$subfields"/>
</xsl:element>
</xsl:template>
<xsl:template name="subfieldSelect">
<xsl:param name="codes"/>
<xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
<xsl:variable name="str">
<xsl:for-each select="marc:subfield">
<xsl:if test="contains($codes, @code)">
<xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
</xsl:template>
<xsl:template name="buildSpaces">
<xsl:param name="spaces"/>
<xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
<xsl:if test="$spaces>0">
<xsl:value-of select="$char"/>
<xsl:call-template name="buildSpaces">
<xsl:with-param name="spaces" select="$spaces - 1"/>
<xsl:with-param name="char" select="$char"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="chopPunctuation">
<xsl:param name="chopString"/>
<xsl:param name="punctuation"><xsl:text>.:,;/ </xsl:text></xsl:param>
<xsl:variable name="length" select="string-length($chopString)"/>
<xsl:choose>
<xsl:when test="$length=0"/>
<xsl:when test="contains($punctuation, substring($chopString,$length,1))">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
<xsl:with-param name="punctuation" select="$punctuation"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="not($chopString)"/>
<xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="chopPunctuationFront">
<xsl:param name="chopString"/>
<xsl:variable name="length" select="string-length($chopString)"/>
<xsl:choose>
<xsl:when test="$length=0"/>
<xsl:when test="contains('.:,;/[ ', substring($chopString,1,1))">
<xsl:call-template name="chopPunctuationFront">
<xsl:with-param name="chopString" select="substring($chopString,2,$length - 1)"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="not($chopString)"/>
<xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<style>
.marc_table {}
.marc_tag_row {}
.marc_tag_data {}
.marc_tag_col {}
.marc_tag_ind {}
.marc_subfields {}
.marc_subfield_code {
color: blue;
padding-left: 5px;
padding-right: 5px;
}
</style>
<link href='/css/opac_marc.css' rel='stylesheet' type='text/css'></link>
</head>
<body>
<div><button onclick='window.print();'>Print Page</button></div>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="marc:record">
<table class='marc_table'>
<tr class='marc_tag_row'>
<th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="middle">
LDR
</th>
<td class='marc_tag_data' COLSPAN='3'>
<xsl:value-of select="marc:leader"/>
</td>
</tr>
<xsl:apply-templates select="marc:datafield|marc:controlfield"/>
</table>
</xsl:template>
<xsl:template match="marc:controlfield">
<tr class='marc_tag_row'>
<th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="middle">
<xsl:value-of select="@tag"/>
</th>
<td class='marc_tag_data' COLSPAN='3'>
<xsl:value-of select="."/>
</td>
</tr>
</xsl:template>
<xsl:template match="marc:datafield">
<tr class='marc_tag_row'>
<th class='marc_tag_col' NOWRAP="TRUE" ALIGN="RIGHT" VALIGN="middle">
<xsl:value-of select="@tag"/>
</th>
<td class='marc_tag_ind'>
<xsl:value-of select="@ind1"/>
</td>
<td class='marc_tag_ind' style='border-left: 1px solid #A0A0A0; padding-left: 3px;'>
<xsl:value-of select="@ind2"/>
<span style='color:#FFF'>.</span>
</td>
<td class='marc_subfields'>
<xsl:apply-templates select="marc:subfield"/>
</td>
</tr>
</xsl:template>
<xsl:template match="marc:subfield">
<span class='marc_subfield_code' >
&#8225;<xsl:value-of select="@code"/>
</span><xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
<metaInformation>
<scenarios ><scenario default="no" name="Ray Charles" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\raycharles.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="yes" name="s7" userelativepaths="yes" externalpreview="no" url="..\ifla\sally7.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->

View File

@ -35,4 +35,6 @@
<!-- TMPL_VAR NAME="opacuserjs" -->
//]]>
</script>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<link rel='unapi-server' type='application/xml' title='unAPI' href='/cgi-bin/koha/unapi'></link>
<link rel="search" type="application/opensearchdescription+xml" title="Koha OpenSearch" href="/cgi-bin/koha/opensearch" />

View File

@ -69,9 +69,11 @@
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="pages" --><p><span class="label">Physical details:</span> <!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></p><!-- /TMPL_IF -->
<!-- COinS / OpenURL -->
<span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=<!-- TMPL_VAR NAME="author" -->&rft.btitle=<!-- TMPL_VAR NAME="title" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&rft.tpages=<!-- TMPL_VAR NAME="size" -->&rft.isbn=<!-- TMPL_VAR NAME=isbn -->&rft.aucorp=&rft.place=<!-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publisher" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!-- TMPL_VAR NAME="series" -->&rft.genre="></span>
<!-- TMPL_IF name="isbn" -->
<p><span class="label">ISBN: </span><!-- TMPL_VAR NAME="isbn" --></p>
<!-- unAPI <abbr/> tag -->
<p><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:<!-- TMPL_VAR NAME="isbn" -->"><!-- TMPL_VAR NAME="isbn" --></abbr></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="issn" -->
<p><span class="label">ISSN:</span><!-- TMPL_VAR NAME="issn" --></p>
@ -429,6 +431,5 @@ title="<!-- TMPL_VAR NAME="itype" -->" /><!-- /TMPL_IF -->
</div>
<script language="javascript" type="text/javascript">function Dopop(link) { newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); }</script>
</div>
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

View File

@ -41,8 +41,21 @@ The installer comes complete with a Developer's Toolkit target ('dev') that
can be used to get a development environment linked directly to revision
control, to support rapid prototyping and an agile development process.
3. Standard APIs - in addition to support for library standards for search
and retrieval (SRU and Z39.50), Koha has native support for OpenSearch/RSS.
3. Standard APIs - Koha 3 supports a number of important library search and
retrieval standards and microformats, such as SRU/W, Z39.50
(http://www.loc.gov/standards/sru/), UnAPI (http://www.loc.gov/standards/sru/)
and COinS/OpenURL
(http://ocoins.info; http://www.niso.org/committees/committee_ax.html).
Also supported is the popular Internet standard: OpenSearch
(http://opensearch.a9.com/) created by Amazon's A9.
Records are stored internally in an SGML-like format and can be retrieved in
MARCXML, Dublin Core, MODS, RSS, Atom, RDF-DC, SRW-DC, OAI-DC, and EndNote;
and the OPAC can be used by citation tools such as Zotero. Creating new
export formats is a trivial exercise in writing XSLT; records can be passed
through XSLT transformations either directly out of the index, or via a
separate parsing function.
To retrieve and interact with Circulation and Patron data, Koha 3 includes
support for 3M's Standard Interchange Protocol (SIP2), using the OpenNCIP
@ -58,11 +71,12 @@ http://wiki.koha.org/doku.php?id=en:development:web_services
Koha 3 also includes pluggable authentication - easy integration with LDAP and
Active Directory via the Auth_with_ldap module.
Amazon.com can be enabled to enrich bibliographic data with jacket covers,
professional reviews, ratings and comments from Amazon users, as well as point
to 'Similar Items' within the catalog. OCLC's xISBN, and LibraryThing's
ThingISBN can likewise be enabled to provide an 'Editions' tab on item detail
pages. Service throttling is now available to keep within subscription limits.
The Amazon.com module can be enabled to enrich bibliographic data with jacket
covers, professional reviews, ratings and comments from Amazon users, as well
as point to 'Similar Items' within the catalog. OCLC's xISBN, and
LibraryThing's ThingISBN can likewise be enabled to provide an 'Editions' tab
on item detail pages. New with Koha 3 is service throttling for these services,
to keep within subscription limits.
4. Cross-platform, multi-RDBMS, Web-server agnostic - Run Koha on the platform
of your choice: Linux, Windows, Mac OS X, FreeBSD, Solaris. Koha 3 also
@ -71,7 +85,10 @@ under Apache2, IIS, or the web server of your choosing.
5. Multi-lingual support - Koha was designed from the ground up for multilingual
libraries. Koha 3 can handle Chinese, Japanese, and even right-to-left languages
such as Arabic and Hebrew with ease.
such as Arabic and Hebrew with ease (BiDi).
Koha's indexe engine (Zebra) can handle record formats containing _any_ UNICODE
script, and utilize the ICU libraries created and maintained by IBM.
You can translate Koha into your language using the built-in translation tools,
or by visiting http://translate.koha.org.

54
opac/opensearch Executable file
View File

@ -0,0 +1,54 @@
#!/usr/bin/perl
use CGI;
use strict;
use warnings;
use C4::Context;
use XML::Simple;
use LWP::Simple;
use LWP::UserAgent;
use HTTP::Request::Common;
my $cgi = new CGI;
binmode(STDOUT, "utf8"); #output as utf8
my $baseurl = C4::Context->preference('OPACBaseURL');
my $libname = C4::Context->preference('LibraryName');
my $opacimage = C4::Context->preference('opacsmallimage');
my $indexname = C4::Context->preference('indexname');
my $q = $cgi->param('q');
my $index = $cgi->param('searchindex');
my $startpage = $cgi->param('startPage') | 1;
my $count = $cgi->param('count') | 20;
if ($q) {
# koha:isbn:0152018484
my $url = "http://$baseurl:9998/biblios?version=1.1&operation=searchRetrieve&query=$q&startRecord=$startpage&maximumRecords=$count&recordSchema=rss2";
my $content = get($url);
print $cgi->header( -type =>'text/xml' );
print $content;
}
else {
print $cgi->header( -type =>'text/xml' );
print "<?xml version='1.0' encoding='utf-8' ?>";
print "<OpenSearchDescription \n\txmlns=\"http://a9.com/-/spec/opensearchdescription/1.0/\"\n\txmlns:openIll=\"http://open-ils.org/xml/openIll/1.0\">";
print "\n<Url>http://$baseurl/cgi-bin/koha/opensearch?q={searchTerms}&amp;searchindex=$indexname&amp;startPage={startPage}&amp;count={count}</Url>";
print "\n<Url type=\"application/rss+xml\" template=\"http://$baseurl/cgi-bin/koha/opensearch?q={searchTerms}&amp;searchindex=$indexname&amp;startPage={startPage}&amp;count={count}\"/>";
print "\n<Url type=\"text/html\" template=\"http://$baseurl/cgi-bin/koha/opensearch?q={searchTerms}\"/>";
print "\n<Format>http://a9.com/-/spec/opensearchrss/1.0/</Format>";
print "\n<ShortName>Koha</ShortName>";
print "\n<LongName>$libname</LongName>";
print "\n<Description>Search for items the in $libname catalog</Description>";
print "\n<Tags>Koha ILS at $libname</Tags>";
print "\n<Image>$opacimage</Image>";
print "\n<SampleSearch>cryptonomicon</SampleSearch>";
print "\n<Developer>Joshua Ferraro</Developer>";
print "\n<Contact>jmf\@liblime.com</Contact>";
print "\n<Attribution>Koha from LibLime: http://liblime.com/koha</Attribution>";
print "\n<SyndicationRight>open</SyndicationRight>";
print "\n<AdultContent>false</AdultContent>";
print "\n</OpenSearchDescription>";
}

55
opac/unapi Executable file
View File

@ -0,0 +1,55 @@
#!/usr/bin/perl
use CGI;
use strict;
use warnings;
use C4::Context;
use XML::Simple;
use LWP::Simple;
use LWP::UserAgent;
use HTTP::Request::Common;
my $cgi = new CGI;
binmode(STDOUT, "utf8"); #output as utf8
my $baseurl = C4::Context->preference('OPACBaseURL');
my $id = $cgi->param('id');
my $format = $cgi->param('format');
if ($id && $format) {
# koha:isbn:0152018484
if ($id =~ /isbn/) {
$id =~ s/koha:isbn://;
my $url = "http://$baseurl:9998/biblios?version=1.1&operation=searchRetrieve&query=$id&startRecord=1&maximumRecords=20&recordSchema=$format";
my $content = get($url);
print $cgi->header( -type =>'application/xml' );
print $content;
}
}
else {
print $cgi->header( -type =>'application/xml' );
print "<?xml version='1.0' encoding='utf-8' ?>
<formats>
<!-- <format name=\"opac\" type=\"text/html\"/> -->
<!-- <format name=\"html\" type=\"text/html\"/> -->
<!-- <format name=\"htmlholdings\" type=\"text/html\"/> -->
<!-- <format name=\"html-full\" type=\"text/html\"/> -->
<!-- <format name=\"htmlholdings-full\" type=\"text/html\"/> -->
<!-- <format name=\"atom\" type=\"application/xml\" namespace_uri=\"http://www.w3.org/2005/Atom\" docs=\"http://www.ietf.org/rfc/rfc4287.txt\"/> -->
<!-- <format name=\"atom-full\" type=\"application/xml\" namespace_uri=\"http://www.w3.org/2005/Atom\" docs=\"http://www.ietf.org/rfc/rfc4287.txt\"/> -->
<format name=\"marcxml\" type=\"application/xml\" namespace_uri=\"http://www.loc.gov/MARC21/slim\" docs=\"http://www.loc.gov/marcxml/\" schema_location=\"http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd\"/>
<format name=\"marcxml-full\" type=\"application/xml\" namespace_uri=\"http://www.loc.gov/MARC21/slim\" docs=\"http://www.loc.gov/marcxml/\" schema_location=\"http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd\"/>
<format name=\"mods\" type=\"application/xml\" namespace_uri=\"http://www.loc.gov/mods/\" docs=\"http://www.loc.gov/mods/\" schema_location=\"http://www.loc.gov/standards/mods/mods.xsd\"/>
<format name=\"mods-full\" type=\"application/xml\" namespace_uri=\"http://www.loc.gov/mods/\" docs=\"http://www.loc.gov/mods/\" schema_location=\"http://www.loc.gov/standards/mods/mods.xsd\"/>
<format name=\"mods3\" type=\"application/xml\" namespace_uri=\"http://www.loc.gov/mods/v3\" docs=\"http://www.loc.gov/mods/\" schema_location=\"http://www.loc.gov/standards/mods/v3/mods-3-1.xsd\"/>
<format name=\"mods3-full\" type=\"application/xml\" namespace_uri=\"http://www.loc.gov/mods/v3\" docs=\"http://www.loc.gov/mods/\" schema_location=\"http://www.loc.gov/standards/mods/v3/mods-3-1.xsd\"/>
<format name=\"oai_dc\" type=\"application/xml\" namespace_uri=\"http://www.openarchives.org/OAI/2.0/oai_dc/\" schema_location=\"http://www.openarchives.org/OAI/2.0/oai_dc.xsd\"/>
<format name=\"rdfdc\" type=\"application/xml\" namespace_uri=\"http://purl.org/dc/elements/1.1/\" schema_location=\"http://purl.org/dc/elements/1.1/\"/>
<format name=\"rss2\" type=\"application/xml\"/>
<format name=\"rss2-full\" type=\"application/xml\"/>
<format name=\"srw_dc\" type=\"application/xml\" namespace_uri=\"info:srw/schema/1/dc-schema\" schema_location=\"http://www.loc.gov/z3950/agency/zing/srw/dc-schema.xsd\"/>
</formats>
";
}