Hi,

The db:retrieve function was in fact being past a full rest query. At first, I didn't think of looking for this error because the value passed in the error message was getting me result when copied in the browser's address bar. I kept thinking: Dear BaseX, if you can resolve the address properly, why can't you just grab the image at the given address? Oh well, now that I am feeding it proper paths, it does grad the image.

Thank you!



On Wed, Oct 24, 2012 at 7:04 AM, Christian Grün <christian.gruen@gmail.com> wrote:
Dear France,

some questions:

– you mentioned that your code used to work before; have you done any
updates, or do you have any other indication that caused the potential
bug?

– have you tried to restart the server/services?

– how does your full XQuery (or, better, the snippet that builds the
request) look like?

– what do you get when adding a trace()? E.g. like this..
  trace(substring-after($x/text(), 'images/'), "")

Looking at the error feedback, I'm wondering that "http..." and "rest"
is contained in the retrieved URI; I would have expected a simple
relative location, such as
"/ImagesAndGlobalContent/global/i_app_available.png" (but I guess I
need to know more about how the query string is built).

Christian
___________________________

> Interesting, but my line leaves no control over the double //:
>
> let $db-image := db:retrieve('ImagesAndGlobalContent',
> substring-after($x/text(), 'images/'))
>
> Other detail:
>
> Database correctly has all images as raw content.
>
>
> On Mon, Oct 22, 2012 at 5:32 PM, Imsieke, Gerrit, le-tex
> <gerrit.imsieke@le-tex.de> wrote:
>>
>>
>>
>> On 2012-10-22 22:05, France Baril wrote:
>>>
>>> Hi,
>>>
>>> I get this error on a db:retrieve:
>>>
>>>     Stopped at line 175, column 119 in
>>>     /Users/archie/BaseXHTTP/How2_StaticHTML.xqm:
>>>     [FODC0002] Resource
>>>
>>> 'http:/localhost:8984/rest/ImagesAndGlobalContent/global/i_app_available.png'
>>>     does not exist.
>>>
>>
>> Noticing that there is only one slash after 'http:' in the purported URI.
>>
>> _______________________________________________
>> BaseX-Talk mailing list
>> BaseX-Talk@mailman.uni-konstanz.de
>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>
>
>
>
> --
> France Baril
> Architecte documentaire / Documentation architect
> france.baril@architextus.com
> (514) 572-0341
>
> _______________________________________________
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>



--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com
(514) 572-0341