Project

Profile

Help

Bug #4658

closed

XError:Unknown function Q{http://www.w3.org/2002/xforms}index(); code:XPST0017

Added by O'Neil Delpratt over 4 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2020-07-28
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
2
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

The Saxon-Forms application is no longer usable since upgrading to Saxon-JS2. Getting the following error:

[Error] XError:Unknown function Q{http://www.w3.org/2002/xforms}index(); code:XPST0017
	push (SaxonJS2.js:4013:450)
	sj (SaxonJS2.js:4527:121)
	(anonymous function) (SaxonJS2.js:4524:493)
	sa (SaxonJS2.js:3847:130)
	Uc (SaxonJS2.js:4524:469)
	d (SaxonJS2.js:4538:432)
	c (SaxonJS2.js:4541:189)
	transform (SaxonJS2.js:4560:287)
	(anonymous function) (demo-repeat.html:12)

Stylesheets here: https://github.com/Saxonica/Saxon-Forms/tree/master/src The sef has been attached to this bug.

Demo to reproduce the bug is also attached to this bug issue.


Files

saxon-xforms.sef.json (524 KB) saxon-xforms.sef.json O'Neil Delpratt, 2020-07-28 08:55
demo-repeat.html (972 Bytes) demo-repeat.html O'Neil Delpratt, 2020-07-28 08:57
demo-repeat-xform.xml (6.93 KB) demo-repeat-xform.xml O'Neil Delpratt, 2020-07-28 08:57
Actions #1

Updated by O'Neil Delpratt over 4 years ago

  • Description updated (diff)
Actions #2

Updated by John Lumley over 4 years ago

  • Status changed from New to In Progress

Problem solved.... and I've been hit by this in the debugger... The reason is that xsl:evaluate on SaxonJS2 is more conformal than it was on JS1. In particular it implements https://www.w3.org/TR/xslt-30/#evaluate-static-context more properly in that user functions are only visible if their visibility is not hidden or private.

In this case the default visibility rules, in the absence of an @visibility or any xsl:expose declarations, appears to be private, hence xsl:evaluate doesn't see it. The solution should be to mark these functions with @visibility="public". It would be simplest for you to try that, rather than me have to download the files.

Note that this, if correct, would need to apply to any function being referenced by xsl:evaluate evaluation.

Actions #3

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from In Progress to Rejected

As suggested I have added the attribute visibility="public" to the functions. Saxon-Forms works great on Saxon-JS2. Closing the bug as rejected.

Actions #4

Updated by Community Admin almost 4 years ago

  • Applies to JS Branch 2 added
  • Applies to JS Branch deleted (2.0)

Please register to edit this issue

Also available in: Atom PDF Tracking page