w3c / xslt30-test

24 stars 14 forks source link

document-uri() on streamed documents #35

Open michaelhkay opened 3 years ago

michaelhkay commented 3 years ago

I found a number of streaming tests (details at https://saxonica.plan.io/issues/4837) which use document-uri() to get the URI of a streamed document node, read for example using xsl:source-document or xsl:merge-source.

The spec doesn't explicitly say what document-uri() should return for a streamed document node. However, it does say that these interfaces for getting streamed documents don't guarantee stability of the resulting document, and it does say that document-uri() guarantees stability, in that it guarantees that doc(document-uri(X)) will always return X. Therefore I think these tests are wrong to rely on document-uri(), and I am changing them to use base-uri() instead. Unlike document-uri(), it is perfectly permissible for two different documents to have the same base URI.