Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.basex.query.value.*;
import org.basex.query.value.item.*;
import org.basex.query.value.map.*;
import org.basex.query.value.seq.*;
import org.basex.query.value.type.*;
import org.basex.query.var.*;
import org.basex.util.*;
Expand Down Expand Up @@ -90,7 +91,7 @@ protected static Value annotate(final QueryContext qc, final InputInfo info, fin
constructor = !type.oneOf(QNAME, NOTATION);
}
} else {
throw Util.notExpected();
return Empty.VALUE;
}
final MapBuilder mb = new MapBuilder();
mb.put("name", name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3142,6 +3142,8 @@ public final class FnModuleTest extends SandboxTest {
@Test public void schemaType() {
final Function func = SCHEMA_TYPE;

query(" declare type t as xs:integer; " + func.args(" #t"), "");
query(func.args(" #fn:schema-type-record"), "");
query(func.args(" #xs:integer") + " ? name", "#integer");
query(func.args(" #xs:long") + " ? primitive-type() ? name", "#decimal");
query(func.args(" #xs:positiveInteger") + " ? base-type() ? name", "#nonNegativeInteger");
Expand Down
Loading