RE: fn:document-uri behaves differently with Saxon 8.6
The problem here is that the previous implementation didn't conform to the
specification for document-uri() says that the result must satisfy
fn:doc(fn:document-uri($arg)) is $arg
The specification of document-uri() says you should return a value that
satisfies the above condition if you can, and return () otherwise. Since the
implementation of the collection() function hasn't retained a value that
satisfies this condition, it seemed right to return nothing. The alternative
of retaining extra information for use by document-uri() would be feasible,
but I'm not sure how useful it would be.
Have you considered getting the information you need from base-uri()? I
think that should give the same answer, but without the above guarantee.
> -----Original Message-----
> From: [hidden email] > [mailto:[hidden email]] On Behalf Of
> Rademacher, Gunther
> Sent: 04 November 2005 23:05
> To: [hidden email] > Subject: [saxon] fn:document-uri behaves differently with Saxon 8.6
> Thanks for Saxon 8.6.
> When running some XQueries against it, I noticed a difference
> in the result of fn:document-uri, when the documents are
> accessed by fn:collection with a directory argument, e.g.
> This now returns an empty result. However with a collection
> file, it works as it did for both variants with the previous
> I read that fn:document-uri has changed, but is this intended
> behaviour? Is there another way to get the document URI with
> the directory based collection variant?
> I found it rather handy to use fn:collection that way.
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App
> Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________
> saxon-help mailing list
> [hidden email] > https://lists.sourceforge.net/lists/listinfo/saxon-help >