This repository was archived by the owner on Oct 12, 2018. It is now read-only.
File tree 1 file changed +61
-0
lines changed
1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ xquery version "1.0-ml" ;
2
+
3
+ (:
4
+ : Module Name: Convert MARCXML to MADS/XML
5
+ :
6
+ : Module Version: 1.0
7
+ :
8
+ : Date: 2015 April 23
9
+ :
10
+ : Copyright: Public Domain
11
+ :
12
+ : Proprietary XQuery Extensions Used: xdmp (MarkLogic)
13
+ :
14
+ : Xquery Specification: January 2007
15
+ :
16
+ : Module Overview: Converts MODS/XML to Bibframe
17
+ : At this time, it uses a stylesheet.
18
+ :
19
+ :)
20
+
21
+ (:~
22
+ : Converts MARC/XML to MADS/XML.
23
+ : At this time, it uses a stylesheet.
24
+ :
25
+ : @author Nate Trail (ntra@loc.gov )
26
+ : @since April 22, 2015
27
+ : @version 1.0
28
+ :)
29
+
30
+ (: NAMESPACES :)
31
+ module namespace modsxml2bibframe = 'info:lc/id-modules/modsxml2bibframe#' ;
32
+
33
+ declare namespace marcxml = "http://www.loc.gov/MARC21/slim" ;
34
+ declare namespace mods = "http://www.loc.gov/mods/v3" ;
35
+ declare namespace xdmp = "http://marklogic.com/xdmp" ;
36
+ declare namespace rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ;
37
+ declare namespace rdfs ="http://www.w3.org/2000/01/rdf-schema#" ;
38
+ declare namespace bf ="http://bibframe.org/vocab/" ;
39
+
40
+ (: FUNCTIONS :)
41
+ (:~
42
+ : This is the main function. Send in MARCXML, get
43
+ : MADS/XML back.
44
+ :
45
+ : @param $marcxml as element() is the rdf data
46
+ : @return html div element
47
+ :)
48
+ declare function modsxml2bibframe:modsxml2bibframe (
49
+ $modsxml as element ()
50
+ )
51
+ as element (rdf:RDF) {
52
+
53
+ let $modsrdf := xdmp:xslt-invoke ("../xsl/MODS2BIBFRAME.xsl" , document { $modsxml } )
54
+ return
55
+ $modsrdf/element ()
56
+
57
+
58
+ };
59
+
60
+
61
+
You can’t perform that action at this time.
0 commit comments