BTW, my workaround for now is to check to see if base-uri() returned an
absolute URL and if it did not, I use my existing code for constructing
URLs to simply combine the relative URL with the parent of the result of
base-uri(), otherwise I use resolve-uri(). That's a sufficiently-general
solution that is not explicitly BaseX specific.

Cheers,

E.

—————
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com




On 4/17/15, 12:07 PM, "Christian Grün" <christian.gr...@gmail.com> wrote:

>Hi Eliot,
>
>> This fails under BaseX:
>>
>> [FORG0002] Base URI is not absolute:
>>"dfst^dfst-sample-project^develo....
>
>I think it also fails if the base URI starts with a slash. Try this for
>example:
>
>  resolve-uri('abc.xml', '/path/def.xml')
>
>What result you would expect from this query, given that it did not
>raise an error?
>
>Using string operations could be an alternative...
>
>  "replace($baseURI, '/[^*]+$', $topicResourcePart)
>
>...but I am not sure if this fulfills all needs.
>
>Christian
>
>
>
>> Obviously, this way of representing document URIs internally is not
>> something that could be easily changed but it is definitely a problem in
>> terms of the expectations of URI handling by built-in XQuery functions.
>>
>> Thanks,
>>
>> Eliot
>> —————
>> Eliot Kimber, Owner
>> Contrext, LLC
>> http://contrext.com
>>
>>
>>
>


Reply via email to