Можете да предавате променливи, просто ги дефинирайте във вашата клауза за предаване:
with table1 AS
(select xmltype(
'<abc>
<def>
<contract>1</contract>
<oper>SFO</oper>
<lmt>limit1</lmt>
</def>
<def>
<contract>2</contract>
<oper>boston</oper>
<lmt >limit2</lmt>
</def>
</abc>'
) xmlcol from dual
)
SELECT u.*
FROM table1
, XMLTable('/abc/def[contract = $count]'
PASSING xmlcol, 1 as "count"
COLUMNS contract integer path 'contract',
oper VARCHAR2(20) PATH 'oper' ) u
CONTRACT OPER
---------- --------------------
1 SFO