The following function compiles and works as expected:
function F_GetXQuerResult2(
P_XmlText in clob
, P_XQueryExpr in varchar2
) return xmltype as
L_r xmltype;
L_x xmltype := xmltype.CreateXml(P_XmlText);
begin
select XMLQUERY( P_XQueryExpr passing L_x returning content ) into L_r from dual;
return L_r;
end F_GetXQuerResult2;


But I get a "syntax error" (not from compile!) and code outline is not displayed