Project

Profile

Help

Support #6285

closed

Are you expecting document-uri() to be a "licensable feature"?

Added by Ken Holman 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2023-12-13
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Java

Description

Hi, folks!

While I await arrival of our updated license file, I started changing the invocations to use Saxon 12.4 instead of Saxon 9.

Unexpectedly, I'm out of the water immediately because document-uri() appears not to function correctly when the license file is absent. Of course I expected licensable features not to work, but I wasn't expecting document-uri() to be such.

I'm reporting this in case this is an oversight on your part and you intended to make the function function even without the license file present.

I hope this is helpful feedback! Happy holidays!

. . . . . . Ken

~/u/git/render/render $ cat /Users/admin/t/document-uri.xsl 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  exclude-result-prefixes="xs"
  version="2.0">

<xsl:output method="text"/>

<xsl:variable name="top" select="/" as="document-node()"/>

<xsl:template match="/">
  <xsl:value-of select="system-property('xsl:product-version')"/>
  <xsl:text>&#xa;</xsl:text>
  <xsl:value-of select="document-uri($top)"/>
  <xsl:text>&#xa;</xsl:text>
</xsl:template>

</xsl:stylesheet>
~/u/git/render/render $ java -jar jar/saxon9/saxon9.jar -s:/Users/admin/t/j.xsl -xsl:/Users/admin/t/document-uri.xsl 
PE 9.9.1.7
file:/Users/admin/t/j.xsl
~/u/git/render/render $ java -jar jar/saxonpe/saxonpe.jar -s:/Users/admin/t/j.xsl -xsl:/Users/admin/t/document-uri.xsl 
No license file found - running with licensable features disabled
PE 12.4

~/u/git/render/render $

Files

document-uri.xsl (518 Bytes) document-uri.xsl Ken Holman, 2023-12-13 01:43
Actions #1

Updated by Norm Tovey-Walsh 5 months ago

Curiously, it appears that the document-uri() is empty in this test case. I think (think!) that the PE warning about licensable features is a red herring. In particular, because HE does the same thing:

$ java -jar build/releases/hej/saxon-he-12.4.jar -xsl:/tmp/out.xsl -s:/tmp/out.xsl
HE 12.4.1

Actions #2

Updated by Michael Kay 5 months ago

This is nothing to do with licensing or with different Saxon editions, it's a change that we had to make to the product for conformance reasons.

The problem is that document-uri() carries a guarantee that you can apply doc() to the result to get the same document back, and that means that it's not possible for two documents to have the same document-uri(). So we no longer give a document a document-uri property if the document is supplied externally, because in that situation we have no guarantee of achieving uniqueness.

It's an unsatisfactory situation, I know.

It's probably worth reading some of the history of the topic - search this forum for document-uri.

Actions #3

Updated by Ken Holman 5 months ago

Thank you for the prompt response allowing me to address this immediately.

Actions #4

Updated by Michael Kay 4 months ago

  • Tracker changed from Bug to Support
  • Status changed from New to Closed
  • Assignee set to Michael Kay

Your raising it here prompted me to take another look at the spec and propose changes: see https://github.com/qt4cg/qtspecs/issues/898

Meanwhile I'll close the issue here since the product is working as designed.

Please register to edit this issue

Also available in: Atom PDF