Empty Query Results when Using Positional Variables Inside XMLTABLE or XMLQUERY (Doc ID 966721.1)

Last updated on OCTOBER 12, 2010

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.6 - Release: 11.1 to 11.1
Information in this document applies to any platform.

Symptoms

We registered a Binary XML Schema with an XML Index as below

CREATE INDEX SCOPUS_2009_IX
ON SCOPUS (OBJECT_VALUE)
INDEXTYPE IS XDB.XMLIndex
PARAMETERS ('
PATHS (
INCLUDE (/DOC/ITEM/ITEM/BIBRECORD/HEAD//*
/DOC/META//*)
NAMESPACE MAPPING (
xmlns="http://www.elsevier.com/xml/xocs/dtd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ait="http://www.elsevier.com/xml/ait/dtd"
xmlns:cto="http://www.elsevier.com/xml/cto/dtd"
xmlns:ce="http://www.elsevier.com/xml/common/dtd"
xmlns:xocs="http://www.elsevier.com/xml/xocs/dtd"
)
)
PATH TABLE SCOPUS_2009_IX_PATH_TABLE (NOLOGGING)
PATH ID INDEX SCOPUS_2009_IX_PATH (NOLOGGING)
ORDER KEY INDEX SCOPUS_2009_IX_ORDER (NOLOGGING)
VALUE INDEX SCOPUS_2009_IX_VALUE (NOLOGGING)
');

The result of this query is simply a null record for each record returned.
SELECT
data.*
FROM
SCOPUS,
XMLTABLE
(
XMLNAMESPACES (
'http://www.elsevier.com/xml/xocs/dtd' as "xocs",
'http://www.elsevier.com/xml/common/dtd' as "ce",
'http://www.elsevier.com/xml/cto/dtd' as "cto",
'http://www.elsevier.com/xml/ait/dtd' as "ait",
'http://www.w3.org/2001/XMLSchema-instance' as "xsi",
DEFAULT 'http://www.elsevier.com/xml/xocs/dtd'
),
'
for $eid at $nr_start in /doc/meta/eid/text()
let $nr := string($nr_start)
return
$nr
'
PASSING OBJECT_VALUE
) data;

COLUMN_VALUE
--------------------------------------------------------------------------------


Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms