쿼리에 구문 오류가 있습니다. return
은 for
, let
, where
또는 order by
절 뒤에 만 유효합니다. 단어 return
을 제거하십시오.
둘째, {
및및및 }
은 노드 내용 내부에서만 유효하므로 제거해야합니다.
마지막으로 함수와 변수를 XQuery 함수 네임 스페이스에서 선언 할 수 없으므로 이러한 함수와 변수를 다른 네임 스페이스에서 선언해야합니다.
확실히 컴파일러 오류가이 모든 것을 말 했어야 했습니까?
declare namespace test = "http://www.example.org/test";
declare function test:con($s1 as xs:anyAtomicType, $s2 as xs:anyAtomicType) as xs:string
{
concat($s1, $s2)
};
declare variable $test:str1 as xs:string:="samah";
declare variable $test:str2 as xs:string:="sama";
declare variable $test:comstring:=test:con($test:str1 ,$test:str2);
$test:comstring