X-Git-Url: http://git.indexdata.com/?p=mp-xquery-moved-to-github.git;a=blobdiff_plain;f=src%2Fmarcxml_raw.patch;fp=src%2Fmarcxml_raw.patch;h=57fd0b0e94bd72426d3f6281fb3b0183a8f0752c;hp=0000000000000000000000000000000000000000;hb=d6f82db2046a3add7e0c59321f15a63b233c434b;hpb=faf0b40133276ba4d44e26b7b61d0a02a33f4ed2 diff --git a/src/marcxml_raw.patch b/src/marcxml_raw.patch new file mode 100644 index 0000000..57fd0b0 --- /dev/null +++ b/src/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, +