Project

Profile

Help

Should the Examples.cs samples be updated to use base-uri instead of document-uri?

Added by Martin Honnen over 1 year ago

As far as I understand it, if working with collections the function document-uri() is no longer returning a URI but an empty sequence for documents in a collection.

Based on that, while looking at the Examples.cs sample of the Saxon resources I wonder whether the two examples in there working with collections and using document-uri shouldn't be changed to use base-uri instead.

Examples are https://saxonica.plan.io/projects/saxonmirrorhe/repository/he/revisions/he_mirror_saxon_11_4/entry/src/samples/cs/Examples.cs#L1380 and https://saxonica.plan.io/projects/saxonmirrorhe/repository/he/revisions/he_mirror_saxon_11_4/entry/src/samples/cs/Examples.cs#L1457, both doing e.g. <xsl:for-each select="collection(...)"><document uri='{document-uri(.)}' nodes='{count(//*)}'/>....

It seems that does just output document uri="" now, which is not really helpful/meaningful. It should better use uri="{base-uri(.)}", no?


Please register to reply