My Oracle Support Banner

LD 1.1, 8.1 - The variable name $item causes the compilation error. (Doc ID 773223.1)

Last updated on MAY 06, 2017

Applies to:

AquaLogic Data Services Platform (ALDSP) - Version 10.3 and later
Information in this document applies to any platform.
Information in this document applies to any platform
***Checked for relevance on 22-January-2014***

Goal

PROBLEM DESCRIPTION:

If a query contains a variable name $item, it will receive a compilation error.
If $item is changed to $item1, it will work.

Query:

let $CUSTOMER_1 := 
               for $item in document("XM-BB-C")/db/CUSTOMER
               return
               <CUSTOMER>
               	<FIRST_NAME>{ xf:data($item/FIRST_NAME) }</FIRST_NAME>
               </CUSTOMER>

where xf:not(xf:empty($CUSTOMER_1))

return

<db>
	{ $CUSTOMER_1 }
</db>

Th error received is as follows.
EJB Exception:; nested exception is: 
	java.rmi.RemoteException: Query Execution Error (Syntax) 1-2-1-1: 
(com.enosysmarkets.xmediator.xquery.ast.ParseException: Encountered "item" at line 4, column 20.

Was expecting one of:

    <NCNAME> ...

    <QNAME> ...

    )

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.