You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xspec-151.xquery (XQuery version of xspec-151.xsl):
module namespace test-mix = "x-urn:test-mix";
import schema "x-urn:test-mix" at "xspec-151.xsd";
declare function test-mix:element-and-string() as item()+ {
let $typed-element as element(test-mix:fooElement, test-mix:fooType) := (
validate strict {doc('xspec-151.xml')/element()}
)
return
($typed-element, 'string')
};
xspec-151.xspec (always fails deliberately):
<?xml version="1.0" encoding="UTF-8"?>
<?xspec-test require-xquery-to-support-schema?>
<?xspec-test require-xslt-to-support-schema?>
<x:descriptionquery="x-urn:test-mix"query-at="xspec-151.xquery"stylesheet="xspec-151.xsl"
xmlns:test-mix="x-urn:test-mix"xmlns:x="http://www.jenitennison.com/xslt/xspec">
<x:scenariolabel="When the result is a mixture of a typed element and a string">
<x:callfunction="test-mix:element-and-string" />
<x:expect
label="[Result] in the failure report HTML must wrap element and string separately"
test="false()" />
</x:scenario>
</x:description>
Running xspec-151.xspec should complete and should return a failure report. But actually it terminates:
XSLT
...run-xslt-test:... [java] Saxon-EE 9.8.0.12J from Saxonica [java] Java version 1.8.0_202... [java] Type error at char 26 in xsl:value-of/@select on line 346 column 70 of generate-tests-utils.xsl: [java] FOTY0012: Cannot get the typed value of an element (test-mix:fooElement) with element-only content [java] Cannot get the typed value of an element (test-mix:fooElement) with element-only contentBUILD FAILED...
XQuery
...run-xquery-test:... [java] Saxon-EE 9.8.0.12J from Saxonica [java] Java version 1.8.0_202... [java] Type error on line 201 column 52 of generate-query-utils.xql: [java] FOTY0012: Cannot get the typed value of an element (test-mix:fooElement) with element-only content [java] at test:report-sequence() (file:/.../xspec-151.xq#16) [java] at local:d6e2() (file:/.../xspec-151.xq#37) [java] Query failed with type error: Cannot get the typed value of an element (test-mix:fooElement) with element-only contentBUILD FAILED...
The text was updated successfully, but these errors were encountered:
AirQuick
changed the title
Test terminates with FOTY0012 in generate-tests-utils.xsl
Test terminates with FOTY0012 in test:report-sequence
Mar 17, 2019
(This description has been edited heavily so that the problem can be reproduced both on XSLT and XQuery.)
Can be reproduced on cbf9087:
xspec-151.xml
xspec-151.xsd
(defines<fooElement>
offooType
):xspec-151.xsl
(XSLT function to return a sequence of afooType
element and a string):xspec-151.xquery
(XQuery version ofxspec-151.xsl
):xspec-151.xspec
(always fails deliberately):Running
xspec-151.xspec
should complete and should return a failure report. But actually it terminates:XSLT
XQuery
The text was updated successfully, but these errors were encountered: