List Info

Thread: does document-uri() work?




does document-uri() work?
user name
2006-05-16 22:31:00

Does Sleepycat DB XML support the document-uri() (http://www.w3.org/TR/2005/CR-xpath-functions-20051103/#func-document-uri) function? I can’t find any mention of it in documentation, and when I run the following, the y values show that there are a bunch of documents in the collection, but the uri elements always show up empty.

 

for $doc in collection('recipes')

  return

 &nbsp; <x>

 &nbsp; &nbsp; <y>{$doc/*/name()}</y&gt;

 &nbsp; &nbsp; <uri>;{document-uri($doc)}&lt;/uri>

 &nbsp; </x>

 

Thanks,

 

Bob

does document-uri() work?
user name
2006-05-17 09:08:53
Hi Bob,

In the current version of DB XML, the document-uri()
function has a bug, 
but this has been fixed in the development version, and will
be 
available in the next release.

You can use the dbxml:metadata() function to get the name of
a document, 
like this:

doc("...")/dbxml:metadata("dbxml:name&quo
t;)

Hope that helps,

John

DuCharme, Bob wrote:
> Does Sleepycat DB XML support the document-uri() 
> (http://www.w3.org/TR/2005/CR-xpath-funct
ions-20051103/#func-document-uri) 
> function? I can’t find any mention of it in
documentation, and when I 
> run the following, the y values show that there are a
bunch of documents 
> in the collection, but the uri elements always show up
empty.
> 
>  
> 
> for $doc in collection('recipes')
> 
>   return
> 
>    <x>
> 
>      <y>{$doc/*/name()}</y>
> 
>      <uri>{document-uri($doc)}</uri>
> 
>    </x>
> 
>  
> 
> Thanks,
> 
>  
> 
> Bob
> 


-- 
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com

Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp
.com/dbxml


------------------------------------------
To remove yourself from this list, send an
email to xml-unsubscribesleepycat.com

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )