Hi Bridger,
> http:send-request(<http:request method='get' href='http://export.arxiv.org/oai2?verb=Identify'/>)/h:response/@status
> fails.
The reason is that http:send-request returns an http:response element
as first item. "/h:response" is just another writing for
"/child::h:response", As the response has no other response child, you
won’t get any result. This is what you can do instead:
1. Use the self axis:
let $data := http:send-request(<http:request method='get'
href='http://export.arxiv.org/oai2?verb=Identify'/>)
return $data/self::http:response/@status
2. Return the status attribute from the first result (which will
always be the http:response element):
let $data := http:send-request(<http:request method='get'
href='http://export.arxiv.org/oai2?verb=Identify'/>)
return head($data)/@status
Hope this helps,
Christian