我正在尝试返回一个字符串,但不知何故这个函数无法编译。我有点失落!
declare function local:findValue($vrf as xs:string?, $namefirst as element()*, $schoolfirst as element()*, $namesecond as element()*, $schoolsecond as element()*) as xs:string? {
return (
if (not(fn:empty($namefirst) or fn:empty($schoolfirst))) then (
if ($vrf) then (
"SCHOOL"
) else (
"HIGHSCHOOL"
)
) else if (not(fn:empty($namesecond) or fn:empty($schoolsecond))) then (
if ($vrf) then (
"SCHOOL"
) else (
"HIGSCHOOL"
)
) else ()
)
};
编译只是不会通过。它引发了标题中提到的异常,任何快速帮助都会很棒!