eXist-db / templating

HTML Templating Library for eXist-db
GNU Lesser General Public License v2.1
5 stars 8 forks source link

Fix non spec compliant XQuery #18

Closed adamretter closed 1 year ago

adamretter commented 1 year ago

You cannot supply an xs:integer to an xs:int according to the W3C spec, trying to do so will raise an XPTY0004. This makes the code more spec compliant, and therefore compatible with upcoming eXist-db versions that are more spec compliant. We will need a new release of templating published to the Public Repo before we can release the next version of eXist-db.

Without such a fix, Monex 3.0.5 (and also other tools that use templating) will see errors like this on newer eXist-db versions:

<exception>
<path>/db/apps/monex/modules/view.xql</path>
<message>err:XPTY0004 xs:integer(2) is not a sub-type of xs:int [at line 293, column 23, source: /exist/etc/../data/expathrepo/templating-1.0.4/content/templates.xqm] In function: templates:resolve(xs:int, xs:string, function(*)) [293:5:/exist/etc/../data/expathrepo/templating-1.0.4/content/templates.xqm] templates:resolve(xs:string, function(*)) [186:18:/exist/etc/../data/expathrepo/templating-1.0.4/content/templates.xqm] templates:call(item(), element(), map(*)) [136:36:/exist/etc/../data/expathrepo/templating-1.0.4/content/templates.xqm] templates:process(node()*, map(*)) [132:51:/exist/etc/../data/expathrepo/templating-1.0.4/content/templates.xqm] templates:process(node()*, map(*)) [89:9:/exist/etc/../data/expathrepo/templating-1.0.4/content/templates.xqm] templates:apply(node()+, function(*), map(*)?, map(*)?) [43:5:/exist/etc/../data/expathrepo/templating-1.0.4/content/templates.xqm]</message>
</exception>
line-o commented 1 year ago

This might already be solved.

line-o commented 1 year ago

No, the infamous xs:ints are still there. Would you check the failing tests @adamretter ?

joewiz commented 1 year ago

Superseded by #19.