Skip to content

Commit

Permalink
fix function parameter data types
Browse files Browse the repository at this point in the history
since the return value of `eutil:getDoc#1` in https://github.com/Edirom/Edirom-Online/blob/babd1c6076ba58214b85a9891c3c2215d9d1c9d6/add/data/xql/getLinkTarget.xql#L278 might be the empty sequence this should be reflected in the function signatures that consume this $doc variable.
  • Loading branch information
peterstadler committed Jan 8, 2025
1 parent babd1c6 commit 37bb5c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions add/data/xql/getLinkTarget.xql
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ declare variable $uri := request:get-parameter('uri', '');
(:~
: Returns a view for an edirom object
:)
declare function local:getView($type as xs:string, $docUri as xs:string, $doc as node()+) as map(*)? {
declare function local:getView($type as xs:string, $docUri as xs:string, $doc as document-node()?) as map(*)? {
let $baseMap := map {
'type': substring-after($type, '_'),
'uri':if ($type = ('mei_textView', 'desc_xmlView')) then
Expand Down Expand Up @@ -124,7 +124,7 @@ declare function local:getView($type as xs:string, $docUri as xs:string, $doc as
(:~
: Returns the views for an edirom object
:)
declare function local:getViews($type as xs:string, $docUri as xs:string, $doc as node()+) as map(*)* {
declare function local:getViews($type as xs:string, $docUri as xs:string, $doc as document-node()?) as map(*)* {

let $views := (
(:'desc_summaryView',:)
Expand Down Expand Up @@ -154,7 +154,7 @@ declare function local:getViews($type as xs:string, $docUri as xs:string, $doc a
(:~
: Returns the window title for an edirom-object
:)
declare function local:getWindowTitle($doc as node(), $type as xs:string) as xs:string {
declare function local:getWindowTitle($doc as document-node()?, $type as xs:string) as xs:string {

(: Work :)
if ($type = 'work') then
Expand Down

0 comments on commit 37bb5c0

Please sign in to comment.