Multiple name spaces in XML Query fails with "nonexistent LOB value"

From: <anthony.garratt_at_googlemail.com>
Date: Fri, 31 Oct 2008 05:09:28 -0700 (PDT)
Message-ID: <2e814092-ae8c-482c-a653-89eab8f88ee7@t18g2000prt.googlegroups.com>


If this query (at the end of the post) is changed to return just one of the extractvalue (or extract) columns it works. Add a second one and it fails with a nonexistent LOB value error. Am I losing my mind or is something wrong with the parser?

Thus:

SELECT extractvalue(VALUE(t),

'//xmpMetadata/rdf:RDF/rdf:Description/dc:title',
'xmlns="http://xmlns.oracle.com/ord/meta/xmp"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   FROM etc, etc,

works okay. But change it to:

SELECT extractvalue(VALUE(t),

'//xmpMetadata/rdf:RDF/rdf:Description/dc:title',
'xmlns="http://xmlns.oracle.com/ord/meta/xmp"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"') xmp_title,

       extractvalue(VALUE(t),

'//xmpMetadata/rdf:RDF/rdf:Description/
dc:creator',
'xmlns="http://xmlns.oracle.com/ord/meta/xmp"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"') xmp_creator   FROM etc, etc,

and it bombs horribly.

Here's the full query:

SELECT extractvalue(VALUE(t),

'//xmpMetadata/rdf:RDF/rdf:Description/dc:title',
'xmlns="http://xmlns.oracle.com/ord/meta/xmp"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"') xmp_title,

       extractvalue(VALUE(t),

'//xmpMetadata/rdf:RDF/rdf:Description/
dc:creator',
'xmlns="http://xmlns.oracle.com/ord/meta/xmp"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"') xmp_creator,
       extractvalue(VALUE(t),

'//xmpMetadata/rdf:RDF/rdf:Description/dc:date',
'xmlns="http://xmlns.oracle.com/ord/meta/xmp"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"') xmp_date,
       extract(VALUE(t),
               '//xmpMetadata/rdf:RDF/rdf:Description',
               'xmlns="http://xmlns.oracle.com/ord/meta/xmp"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"') xmp_creator   FROM TABLE(xmlsequence(xmltype('<xmpMetadata xmlns="http://
xmlns.oracle.com/ord/meta/xmp" xsi:schemaLocation="http://
xmlns.oracle.com/ord/meta/xmp http://xmlns.oracle.com/ord/meta/xmp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">     <rdf:Description about="" xmlns:dc="http://purl.org/dc/elements/ 1.1/">
      <dc:title>Some photo or other</dc:title>
      <dc:creator>Me Me Me</dc:creator>
      <dc:date>30-OCT-08</dc:date>
      <dc:description>this is a metadata test</dc:description>
      <dc:copyright>(c) Me Me Me 2008</dc:copyright>
    </rdf:Description>
  </rdf:RDF>
</xmpMetadata>'))) t;

Happens on 10.2.0.4 on Solaris, and 11.1.0.6 on (probably) Solaris or RedHat, not sure which. Received on Fri Oct 31 2008 - 07:09:28 CDT

Original text of this message