From a5a1156764f6ac90995398cc97c2cb42d8324f99 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 8 Jul 2014 14:58:22 +0200 Subject: [PATCH] Move patch file to bibframe directory --- bibframe/marcxml_raw.patch | 17 +++++++++++++++++ src/marcxml_raw.patch | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 bibframe/marcxml_raw.patch delete mode 100644 src/marcxml_raw.patch diff --git a/bibframe/marcxml_raw.patch b/bibframe/marcxml_raw.patch new file mode 100644 index 0000000..57fd0b0 --- /dev/null +++ b/bibframe/marcxml_raw.patch @@ -0,0 +1,17 @@ +diff --git a/xbin/zorba3-0.xqy b/xbin/zorba3-0.xqy +index ba07c2e..481950f 100644 +--- a/xbin/zorba3-0.xqy ++++ b/xbin/zorba3-0.xqy +@@ -212,7 +212,11 @@ let $marcxml := + let $json := http:get($marcxmluri) + return parsexml:parse($json("body")("content"), ) + else +- let $raw-data as xs:string := file:read-text($marcxmluri) ++ let $raw-data := ++ if ( fn:starts-with($marcxmluri, "raw:" ) ) then ++ fn:substring($marcxmluri, 5) ++ else ++ file:read-text($marcxmluri) + let $mxml := parsexml:parse( + $raw-data, + diff --git a/src/marcxml_raw.patch b/src/marcxml_raw.patch deleted file mode 100644 index 57fd0b0..0000000 --- a/src/marcxml_raw.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/xbin/zorba3-0.xqy b/xbin/zorba3-0.xqy -index ba07c2e..481950f 100644 ---- a/xbin/zorba3-0.xqy -+++ b/xbin/zorba3-0.xqy -@@ -212,7 +212,11 @@ let $marcxml := - let $json := http:get($marcxmluri) - return parsexml:parse($json("body")("content"), ) - else -- let $raw-data as xs:string := file:read-text($marcxmluri) -+ let $raw-data := -+ if ( fn:starts-with($marcxmluri, "raw:" ) ) then -+ fn:substring($marcxmluri, 5) -+ else -+ file:read-text($marcxmluri) - let $mxml := parsexml:parse( - $raw-data, - -- 1.7.10.4