RPM for zorba and mp-xquery
[mp-xquery-moved-to-github.git] / src / marcxml_raw.patch
1 diff --git a/xbin/zorba3-0.xqy b/xbin/zorba3-0.xqy
2 index ba07c2e..481950f 100644
3 --- a/xbin/zorba3-0.xqy
4 +++ b/xbin/zorba3-0.xqy
5 @@ -212,7 +212,11 @@ let $marcxml :=
6          let $json := http:get($marcxmluri)
7          return parsexml:parse($json("body")("content"), <parseoptions:options/>)
8      else
9 -        let $raw-data as xs:string := file:read-text($marcxmluri)
10 +        let $raw-data :=
11 +            if ( fn:starts-with($marcxmluri, "raw:" ) ) then
12 +                fn:substring($marcxmluri, 5)
13 +            else
14 +                file:read-text($marcxmluri)
15          let $mxml := parsexml:parse(
16                      $raw-data, 
17                      <parseoptions:options />