Bugzilla – Attachment 78617 Details for
Bug 10662
Build OAI-PMH Harvesting Client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Sample XSLT filter for converting OAI_DC into MARCXML
OAIDC2MARCXML.xsl (text/xml), 3.64 KB, created by
David Cook
on 2018-09-12 23:05:27 UTC
(
hide
)
Description:
Sample XSLT filter for converting OAI_DC into MARCXML
Filename:
MIME Type:
Creator:
David Cook
Created:
2018-09-12 23:05:27 UTC
Size:
3.64 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> ><xsl:stylesheet version="1.0" > xmlns:oai="http://www.openarchives.org/OAI/2.0/" > xmlns:dc="http://purl.org/dc/elements/1.1/" > xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns="http://www.loc.gov/MARC21/slim" > exclude-result-prefixes="dc oai oai_dc"> > <xsl:output method="xml" encoding="UTF-8" indent="yes"/> > <!-- NOTE: This XSLT strips the OAI-PMH wrapper from the metadata. --> > > <!-- Match the root oai:record element --> > <xsl:template match="oai:record"> > <!-- Apply templates only to the child metadata element(s) --> > <xsl:apply-templates select="oai:metadata" /> > </xsl:template> > > <!-- Matches an oai:metadata element --> > <xsl:template match="oai:metadata"> > <!-- Create a copy of child attributes and nodes --> > <!-- <xsl:apply-templates select="@* | node()" /> --> > <xsl:apply-templates select="oai_dc:dc" /> > </xsl:template> > > <xsl:template match="oai_dc:dc"> > <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" > > <xsl:element name="leader"> > <xsl:variable name="type" select="dc:type"/> > <xsl:variable name="leader06"> > <xsl:choose> > <xsl:when test="$type='collection'">p</xsl:when> > <xsl:when test="$type='dataset'">m</xsl:when> > <xsl:when test="$type='event'">r</xsl:when> > <xsl:when test="$type='image'">k</xsl:when> > <xsl:when test="$type='interactive resource'">m</xsl:when> > <xsl:when test="$type='service'">m</xsl:when> > <xsl:when test="$type='software'">m</xsl:when> > <xsl:when test="$type='sound'">i</xsl:when> > <xsl:when test="$type='text'">a</xsl:when> > <xsl:otherwise>a</xsl:otherwise> > </xsl:choose> > </xsl:variable> > <xsl:variable name="leader07"> > <xsl:choose> > <xsl:when test="$type='collection'">c</xsl:when> > <xsl:otherwise>m</xsl:otherwise> > </xsl:choose> > </xsl:variable> > <xsl:value-of select="concat(' ',$leader06,$leader07,' 3u ')"/> > </xsl:element> > > <xsl:for-each select="dc:title"> > <datafield tag="245" ind1="0" ind2="0"> > <subfield code="a"> > <xsl:value-of select="."/> > </subfield> > </datafield> > </xsl:for-each> > > <xsl:for-each select="dc:creator"> > <datafield tag="700" ind1=" " ind2=" "> > <subfield code="a"> > <xsl:value-of select="."/> > </subfield> > <subfield code="e">author</subfield> > </datafield> > </xsl:for-each> > > <xsl:for-each select="dc:subject"> > <datafield tag="653" ind1=" " ind2=" "> > <subfield code="a"> > <xsl:value-of select="."/> > </subfield> > </datafield> > </xsl:for-each> > > </record> > </xsl:template> > > <!-- Identity transformation: this template copies attributes and nodes --> > <xsl:template match="@* | node()"> > <!-- Create a copy of this attribute or node --> > <xsl:copy> > <!-- Recursively apply this template to the attributes and child nodes of this element --> > <xsl:apply-templates select="@* | node()" /> > </xsl:copy> > </xsl:template> ></xsl:stylesheet>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10662
:
20757
|
20758
|
21954
|
42446
|
42447
|
42448
|
44792
|
44793
|
47675
|
48096
|
49832
|
50254
|
50980
|
51510
|
51511
|
51512
|
51514
|
51562
|
51563
|
51564
|
51565
|
51705
|
53258
|
53259
|
53260
|
53361
|
53362
|
64444
|
64445
|
64446
|
64479
|
64480
|
64481
|
65016
|
65017
|
65018
|
65019
|
68508
|
71008
|
71009
|
71010
|
71011
|
71012
|
71013
|
71014
|
71015
|
78569
|
78570
|
78571
|
78572
|
78573
|
78574
|
78575
|
78576
|
78577
|
78583
|
78601
| 78617 |
78754
|
78756
|
78758
|
78760
|
78762
|
78764
|
78767
|
78769
|
78771
|
78859
|
78860
|
78914
|
78956
|
79039
|
79045
|
81783
|
81784
|
81786
|
81789
|
81790
|
81855
|
81856
|
81861
|
81862
|
81863
|
81864
|
81902
|
82219
|
84318
|
84319
|
84320
|
84321
|
84322
|
85152
|
85224
|
85225
|
85226
|
85227
|
85228
|
85229
|
99739
|
99740
|
99741
|
99742
|
99743
|
99744
|
99745