From: William B. <wh...@ca...> - 2005-08-31 19:11:48
|
Hi, I have a very odd problem with XQuery not returning some of the data from inside an xml fragment that was inserted using the XQuery update extension (Using exist 2005/08/05 snapshot): My document looks like this: <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:ib="http://www.cl.cam.ac.uk/~whb21/intelligentBook#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:lang="en"> <rdf:Description rdf:about="http://abc.net.au/news/default.htm"> <rdf:type rdf:resource="http://www.cl.cam.ac.uk/~whb21/intelligentBook#Explanation"/> <ib:topic xml:lang="en">news</ib:topic> <dc:Title xmlns:dc="http://purl.org/dc/elements/1.0/">ABC News</dc:Title> <dc:Creator xmlns:dc="http://purl.org/dc/elements/1.0/">ABC</dc:Creator> <dc:Description xmlns:dc="http://purl.org/dc/elements/1.0/">News from the ABC</dc:Description> <ib:type>Introduction</ib:type> </rdf:Description> </rdf:RDF> An XQuery of //rdf:Description run on the collection does pickup the top level fragment. However, XQueries of: //rdf:Description/@rdf:about //rdf:Description/ib:topic or even //rdf:Description/@* do not return the contents. My suspicion is that this might be because the rdf:Description fragment was inserted using the XQuery update extensions - essentially the important part of the XQuery that inserted it being (update insert $c_fragment into $to) where $c_fragment was the entire XML of the rdf:Description (including subelements) and $c_to was the top level rdf:RDF element. Is only the top level element being indexed? Or am I missing something? Any solutions to this problem gratefully received! cheers, Will Billingsley |