xq-lsp 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/README.md +119 -12
- package/builtins/builtins-array.xq +34 -9
- package/builtins/builtins-fn.xq +492 -101
- package/builtins/builtins-map.xq +6 -2
- package/builtins/builtins-math.xq +1 -1
- package/builtins/builtins-xs.xq +63 -0
- package/demo/index.html +151 -0
- package/demo/main.ts +307 -0
- package/demo/package-lock.json +1301 -0
- package/demo/package.json +20 -0
- package/demo/vite.config.ts +15 -0
- package/dist/analyzer.d.ts +28 -0
- package/dist/analyzer.js +128 -40
- package/dist/ast-nodes.d.ts +90 -0
- package/dist/ast-nodes.js +305 -0
- package/dist/builtins.js +3 -0
- package/dist/completion-core.d.ts +17 -0
- package/dist/completion-core.js +113 -0
- package/dist/completion.d.ts +3 -8
- package/dist/completion.js +10 -150
- package/dist/config.d.ts +13 -0
- package/dist/config.js +81 -0
- package/dist/context-item-diagnostics.d.ts +19 -0
- package/dist/context-item-diagnostics.js +133 -0
- package/dist/definition.d.ts +4 -0
- package/dist/definition.js +67 -0
- package/dist/features.d.ts +1 -2
- package/dist/features.js +81 -112
- package/dist/functioncall-diagnostics.d.ts +12 -0
- package/dist/functioncall-diagnostics.js +87 -0
- package/dist/hover-core.d.ts +39 -0
- package/dist/hover-core.js +87 -0
- package/dist/namespace-diagnostics.d.ts +33 -0
- package/dist/namespace-diagnostics.js +108 -0
- package/dist/qt4-worker.d.ts +18 -0
- package/dist/qt4-worker.js +46 -0
- package/dist/runtimes.d.ts +2 -0
- package/dist/runtimes.js +67 -0
- package/dist/server.js +254 -50
- package/dist/test-utils.d.ts +3 -0
- package/dist/test-utils.js +16 -0
- package/dist/typechecker.d.ts +7 -0
- package/dist/typechecker.js +388 -0
- package/dist/types.d.ts +30 -6
- package/dist/types.js +6 -0
- package/dist/unused-diagnostics.d.ts +19 -0
- package/dist/unused-diagnostics.js +202 -0
- package/firebase.json +12 -0
- package/package.json +31 -27
- package/release-please-config.json +16 -0
- package/scripts/generate-existdb.ts +890 -0
- package/src/analyzer.test.ts +163 -0
- package/src/analyzer.ts +139 -41
- package/src/ast-nodes.ts +348 -0
- package/src/builtins.test.ts +32 -0
- package/src/builtins.ts +3 -0
- package/src/completion-core.ts +139 -0
- package/src/completion.test.ts +152 -0
- package/src/completion.ts +11 -173
- package/src/config.ts +90 -0
- package/src/context-item-diagnostics.test.ts +182 -0
- package/src/context-item-diagnostics.ts +143 -0
- package/src/definition.ts +82 -0
- package/src/features.test.ts +110 -0
- package/src/features.ts +87 -128
- package/src/functioncall-diagnostics.test.ts +169 -0
- package/src/functioncall-diagnostics.ts +110 -0
- package/src/hover-core.ts +114 -0
- package/src/lsp-config.test.ts +183 -0
- package/src/namespace-diagnostics.test.ts +162 -0
- package/src/namespace-diagnostics.ts +133 -0
- package/src/qt4-diagnostic.test.ts +271 -0
- package/src/qt4-snaps/app-CatalogCheck.snap +1 -0
- package/src/qt4-snaps/app-Demos.snap +18 -0
- package/src/qt4-snaps/app-Duplicates.snap +1 -0
- package/src/qt4-snaps/app-FunctxFn.snap +162 -0
- package/src/qt4-snaps/app-FunctxFunctx.snap +714 -0
- package/src/qt4-snaps/app-UseCaseCompoundValues.snap +1 -0
- package/src/qt4-snaps/app-UseCaseJSON.snap +1 -0
- package/src/qt4-snaps/app-UseCaseNLP.snap +1 -0
- package/src/qt4-snaps/app-UseCaseNS.snap +1 -0
- package/src/qt4-snaps/app-UseCaseR.snap +1 -0
- package/src/qt4-snaps/app-UseCaseR31.snap +1 -0
- package/src/qt4-snaps/app-UseCaseSEQ.snap +1 -0
- package/src/qt4-snaps/app-UseCaseSGML.snap +1 -0
- package/src/qt4-snaps/app-UseCaseSTRING.snap +1 -0
- package/src/qt4-snaps/app-UseCaseTREE.snap +1 -0
- package/src/qt4-snaps/app-UseCaseXMP.snap +1 -0
- package/src/qt4-snaps/app-Walmsley.snap +1 -0
- package/src/qt4-snaps/app-XMark.snap +10 -0
- package/src/qt4-snaps/array-append.snap +1 -0
- package/src/qt4-snaps/array-filter.snap +10 -0
- package/src/qt4-snaps/array-flatten.snap +1 -0
- package/src/qt4-snaps/array-fold-left.snap +1 -0
- package/src/qt4-snaps/array-fold-right.snap +1 -0
- package/src/qt4-snaps/array-for-each-pair.snap +1 -0
- package/src/qt4-snaps/array-for-each.snap +1 -0
- package/src/qt4-snaps/array-get.snap +1 -0
- package/src/qt4-snaps/array-head.snap +1 -0
- package/src/qt4-snaps/array-insert-before.snap +1 -0
- package/src/qt4-snaps/array-join.snap +1 -0
- package/src/qt4-snaps/array-put.snap +1 -0
- package/src/qt4-snaps/array-remove.snap +1 -0
- package/src/qt4-snaps/array-reverse.snap +1 -0
- package/src/qt4-snaps/array-size.snap +1 -0
- package/src/qt4-snaps/array-sort.snap +1 -0
- package/src/qt4-snaps/array-subarray.snap +1 -0
- package/src/qt4-snaps/array-tail.snap +1 -0
- package/src/qt4-snaps/bin-and.snap +1 -0
- package/src/qt4-snaps/bin-bin.snap +1 -0
- package/src/qt4-snaps/bin-decode-string.snap +1 -0
- package/src/qt4-snaps/bin-encode-string.snap +1 -0
- package/src/qt4-snaps/bin-find.snap +1 -0
- package/src/qt4-snaps/bin-from-octets.snap +1 -0
- package/src/qt4-snaps/bin-hex.snap +1 -0
- package/src/qt4-snaps/bin-insert-before.snap +1 -0
- package/src/qt4-snaps/bin-join.snap +1 -0
- package/src/qt4-snaps/bin-length.snap +1 -0
- package/src/qt4-snaps/bin-not.snap +1 -0
- package/src/qt4-snaps/bin-octal.snap +1 -0
- package/src/qt4-snaps/bin-or.snap +1 -0
- package/src/qt4-snaps/bin-pack-double.snap +1 -0
- package/src/qt4-snaps/bin-pack-float.snap +1 -0
- package/src/qt4-snaps/bin-pack-integer.snap +1 -0
- package/src/qt4-snaps/bin-pad-left.snap +1 -0
- package/src/qt4-snaps/bin-pad-right.snap +1 -0
- package/src/qt4-snaps/bin-part.snap +1 -0
- package/src/qt4-snaps/bin-shift.snap +1 -0
- package/src/qt4-snaps/bin-to-octets.snap +1 -0
- package/src/qt4-snaps/bin-unpack-double.snap +1 -0
- package/src/qt4-snaps/bin-unpack-float.snap +1 -0
- package/src/qt4-snaps/bin-unpack-integer.snap +1 -0
- package/src/qt4-snaps/bin-unpack-unsigned-integer.snap +1 -0
- package/src/qt4-snaps/bin-xor.snap +1 -0
- package/src/qt4-snaps/file-file.snap +1 -0
- package/src/qt4-snaps/fn-QName.snap +1 -0
- package/src/qt4-snaps/fn-abs.snap +1 -0
- package/src/qt4-snaps/fn-adjust-date-to-timezone.snap +1 -0
- package/src/qt4-snaps/fn-adjust-dateTime-to-timezone.snap +1 -0
- package/src/qt4-snaps/fn-adjust-time-to-timezone.snap +1 -0
- package/src/qt4-snaps/fn-analyze-string.snap +1 -0
- package/src/qt4-snaps/fn-apply.snap +1 -0
- package/src/qt4-snaps/fn-available-environment-variables.snap +1 -0
- package/src/qt4-snaps/fn-avg.snap +1 -0
- package/src/qt4-snaps/fn-base-uri.snap +1 -0
- package/src/qt4-snaps/fn-boolean.snap +1 -0
- package/src/qt4-snaps/fn-ceiling.snap +1 -0
- package/src/qt4-snaps/fn-codepoint-equal.snap +1 -0
- package/src/qt4-snaps/fn-codepoints-to-string.snap +1 -0
- package/src/qt4-snaps/fn-collation-key.snap +1 -0
- package/src/qt4-snaps/fn-collection.snap +1 -0
- package/src/qt4-snaps/fn-compare.snap +1 -0
- package/src/qt4-snaps/fn-concat.snap +1 -0
- package/src/qt4-snaps/fn-contains-token.snap +1 -0
- package/src/qt4-snaps/fn-contains.snap +1 -0
- package/src/qt4-snaps/fn-count.snap +1 -0
- package/src/qt4-snaps/fn-current-date.snap +1 -0
- package/src/qt4-snaps/fn-current-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-current-time.snap +1 -0
- package/src/qt4-snaps/fn-data.snap +8 -0
- package/src/qt4-snaps/fn-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-day-from-date.snap +1 -0
- package/src/qt4-snaps/fn-day-from-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-days-from-duration.snap +1 -0
- package/src/qt4-snaps/fn-deep-equal.snap +1 -0
- package/src/qt4-snaps/fn-default-collation.snap +1 -0
- package/src/qt4-snaps/fn-default-language.snap +1 -0
- package/src/qt4-snaps/fn-distinct-values.snap +1 -0
- package/src/qt4-snaps/fn-doc-available.snap +1 -0
- package/src/qt4-snaps/fn-doc.snap +1 -0
- package/src/qt4-snaps/fn-document-uri.snap +8 -0
- package/src/qt4-snaps/fn-element-with-id.snap +1 -0
- package/src/qt4-snaps/fn-empty.snap +1 -0
- package/src/qt4-snaps/fn-encode-for-uri.snap +1 -0
- package/src/qt4-snaps/fn-ends-with.snap +1 -0
- package/src/qt4-snaps/fn-environment-variable.snap +1 -0
- package/src/qt4-snaps/fn-error.snap +128 -0
- package/src/qt4-snaps/fn-escape-html-uri.snap +1 -0
- package/src/qt4-snaps/fn-exactly-one.snap +1 -0
- package/src/qt4-snaps/fn-exists.snap +1 -0
- package/src/qt4-snaps/fn-false.snap +1 -0
- package/src/qt4-snaps/fn-filter.snap +10 -0
- package/src/qt4-snaps/fn-floor.snap +1 -0
- package/src/qt4-snaps/fn-fold-left.snap +1 -0
- package/src/qt4-snaps/fn-fold-right.snap +1 -0
- package/src/qt4-snaps/fn-for-each-pair.snap +10 -0
- package/src/qt4-snaps/fn-for-each.snap +10 -0
- package/src/qt4-snaps/fn-format-date.snap +26 -0
- package/src/qt4-snaps/fn-format-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-format-integer.snap +1 -0
- package/src/qt4-snaps/fn-format-number.snap +38 -0
- package/src/qt4-snaps/fn-format-time.snap +1 -0
- package/src/qt4-snaps/fn-function-arity.snap +1 -0
- package/src/qt4-snaps/fn-function-lookup.snap +1 -0
- package/src/qt4-snaps/fn-function-name.snap +1 -0
- package/src/qt4-snaps/fn-generate-id.snap +18 -0
- package/src/qt4-snaps/fn-has-children.snap +26 -0
- package/src/qt4-snaps/fn-head.snap +1 -0
- package/src/qt4-snaps/fn-hours-from-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-hours-from-duration.snap +1 -0
- package/src/qt4-snaps/fn-hours-from-time.snap +1 -0
- package/src/qt4-snaps/fn-id.snap +10 -0
- package/src/qt4-snaps/fn-idref.snap +10 -0
- package/src/qt4-snaps/fn-implicit-timezone.snap +1 -0
- package/src/qt4-snaps/fn-in-scope-prefixes.snap +26 -0
- package/src/qt4-snaps/fn-index-of.snap +1 -0
- package/src/qt4-snaps/fn-innermost.snap +58 -0
- package/src/qt4-snaps/fn-insert-before.snap +1 -0
- package/src/qt4-snaps/fn-iri-to-uri.snap +1 -0
- package/src/qt4-snaps/fn-json-doc.snap +1 -0
- package/src/qt4-snaps/fn-json-to-xml.snap +1 -0
- package/src/qt4-snaps/fn-lang.snap +10 -0
- package/src/qt4-snaps/fn-last.snap +1 -0
- package/src/qt4-snaps/fn-load-xquery-module.snap +1 -0
- package/src/qt4-snaps/fn-local-name-from-QName.snap +1 -0
- package/src/qt4-snaps/fn-local-name.snap +10 -0
- package/src/qt4-snaps/fn-lower-case.snap +1 -0
- package/src/qt4-snaps/fn-matches.re.snap +1 -0
- package/src/qt4-snaps/fn-matches.snap +1 -0
- package/src/qt4-snaps/fn-max.snap +1 -0
- package/src/qt4-snaps/fn-min.snap +1 -0
- package/src/qt4-snaps/fn-minutes-from-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-minutes-from-duration.snap +1 -0
- package/src/qt4-snaps/fn-minutes-from-time.snap +1 -0
- package/src/qt4-snaps/fn-month-from-date.snap +1 -0
- package/src/qt4-snaps/fn-month-from-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-months-from-duration.snap +1 -0
- package/src/qt4-snaps/fn-name.snap +10 -0
- package/src/qt4-snaps/fn-namespace-uri-for-prefix.snap +1 -0
- package/src/qt4-snaps/fn-namespace-uri-from-QName.snap +1 -0
- package/src/qt4-snaps/fn-namespace-uri.snap +1 -0
- package/src/qt4-snaps/fn-nilled.snap +16 -0
- package/src/qt4-snaps/fn-node-name.snap +32 -0
- package/src/qt4-snaps/fn-normalize-space.snap +1 -0
- package/src/qt4-snaps/fn-normalize-unicode.snap +26 -0
- package/src/qt4-snaps/fn-not.snap +1 -0
- package/src/qt4-snaps/fn-number.snap +1 -0
- package/src/qt4-snaps/fn-one-or-more.snap +1 -0
- package/src/qt4-snaps/fn-outermost.snap +58 -0
- package/src/qt4-snaps/fn-parse-ietf-date.snap +1 -0
- package/src/qt4-snaps/fn-parse-json.snap +1 -0
- package/src/qt4-snaps/fn-parse-xml-fragment.snap +1 -0
- package/src/qt4-snaps/fn-parse-xml.snap +1 -0
- package/src/qt4-snaps/fn-path.snap +26 -0
- package/src/qt4-snaps/fn-position.snap +1 -0
- package/src/qt4-snaps/fn-prefix-from-QName.snap +1 -0
- package/src/qt4-snaps/fn-random-number-generator.snap +1 -0
- package/src/qt4-snaps/fn-remove.snap +1 -0
- package/src/qt4-snaps/fn-replace.snap +330 -0
- package/src/qt4-snaps/fn-resolve-QName.snap +1 -0
- package/src/qt4-snaps/fn-resolve-uri.snap +1 -0
- package/src/qt4-snaps/fn-reverse.snap +1 -0
- package/src/qt4-snaps/fn-root.snap +10 -0
- package/src/qt4-snaps/fn-round-half-to-even.snap +1 -0
- package/src/qt4-snaps/fn-round.snap +8 -0
- package/src/qt4-snaps/fn-seconds-from-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-seconds-from-duration.snap +1 -0
- package/src/qt4-snaps/fn-seconds-from-time.snap +1 -0
- package/src/qt4-snaps/fn-serialize.snap +50 -0
- package/src/qt4-snaps/fn-sort.snap +1 -0
- package/src/qt4-snaps/fn-starts-with.snap +1 -0
- package/src/qt4-snaps/fn-static-base-uri.snap +1 -0
- package/src/qt4-snaps/fn-string-join.snap +8 -0
- package/src/qt4-snaps/fn-string-length.snap +1 -0
- package/src/qt4-snaps/fn-string-to-codepoints.snap +1 -0
- package/src/qt4-snaps/fn-string.snap +10 -0
- package/src/qt4-snaps/fn-subsequence.snap +1 -0
- package/src/qt4-snaps/fn-substring-after.snap +1 -0
- package/src/qt4-snaps/fn-substring-before.snap +1 -0
- package/src/qt4-snaps/fn-substring.snap +1 -0
- package/src/qt4-snaps/fn-sum.snap +1 -0
- package/src/qt4-snaps/fn-tail.snap +1 -0
- package/src/qt4-snaps/fn-timezone-from-date.snap +1 -0
- package/src/qt4-snaps/fn-timezone-from-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-timezone-from-time.snap +1 -0
- package/src/qt4-snaps/fn-tokenize.snap +16 -0
- package/src/qt4-snaps/fn-trace.snap +8 -0
- package/src/qt4-snaps/fn-transform.snap +1 -0
- package/src/qt4-snaps/fn-translate.snap +1 -0
- package/src/qt4-snaps/fn-true.snap +1 -0
- package/src/qt4-snaps/fn-unordered.snap +1 -0
- package/src/qt4-snaps/fn-unparsed-text-available.snap +1 -0
- package/src/qt4-snaps/fn-unparsed-text-lines.snap +1 -0
- package/src/qt4-snaps/fn-unparsed-text.snap +1 -0
- package/src/qt4-snaps/fn-upper-case.snap +1 -0
- package/src/qt4-snaps/fn-uri-collection.snap +1 -0
- package/src/qt4-snaps/fn-xml-to-json.snap +1 -0
- package/src/qt4-snaps/fn-year-from-date.snap +1 -0
- package/src/qt4-snaps/fn-year-from-dateTime.snap +1 -0
- package/src/qt4-snaps/fn-years-from-duration.snap +1 -0
- package/src/qt4-snaps/fn-zero-or-one.snap +1 -0
- package/src/qt4-snaps/map-contains.snap +1 -0
- package/src/qt4-snaps/map-entry.snap +1 -0
- package/src/qt4-snaps/map-find.snap +1 -0
- package/src/qt4-snaps/map-for-each.snap +1 -0
- package/src/qt4-snaps/map-get.snap +1 -0
- package/src/qt4-snaps/map-keys.snap +1 -0
- package/src/qt4-snaps/map-merge.snap +1 -0
- package/src/qt4-snaps/map-put.snap +1 -0
- package/src/qt4-snaps/map-remove.snap +1 -0
- package/src/qt4-snaps/map-size.snap +1 -0
- package/src/qt4-snaps/math-math-acos.snap +1 -0
- package/src/qt4-snaps/math-math-asin.snap +1 -0
- package/src/qt4-snaps/math-math-atan.snap +1 -0
- package/src/qt4-snaps/math-math-atan2.snap +1 -0
- package/src/qt4-snaps/math-math-cos.snap +1 -0
- package/src/qt4-snaps/math-math-exp.snap +1 -0
- package/src/qt4-snaps/math-math-exp10.snap +1 -0
- package/src/qt4-snaps/math-math-log.snap +1 -0
- package/src/qt4-snaps/math-math-log10.snap +1 -0
- package/src/qt4-snaps/math-math-pi.snap +1 -0
- package/src/qt4-snaps/math-math-pow.snap +1 -0
- package/src/qt4-snaps/math-math-sin.snap +1 -0
- package/src/qt4-snaps/math-math-sqrt.snap +1 -0
- package/src/qt4-snaps/math-math-tan.snap +1 -0
- package/src/qt4-snaps/misc-AnnexE.snap +1 -0
- package/src/qt4-snaps/misc-AppendixA4.snap +1 -0
- package/src/qt4-snaps/misc-CombinedErrorCodes.snap +350 -0
- package/src/qt4-snaps/misc-ErrorsAndOptimization.snap +1 -0
- package/src/qt4-snaps/misc-HigherOrderFunctions.snap +32 -0
- package/src/qt4-snaps/misc-JsonTestSuite.snap +1 -0
- package/src/qt4-snaps/misc-StaticContext.snap +8 -0
- package/src/qt4-snaps/misc-Surrogates.snap +34 -0
- package/src/qt4-snaps/misc-UCACollation.snap +1 -0
- package/src/qt4-snaps/misc-XMLEdition.snap +22 -0
- package/src/qt4-snaps/op-QName-equal.snap +1 -0
- package/src/qt4-snaps/op-add-dayTimeDuration-to-date.snap +1 -0
- package/src/qt4-snaps/op-add-dayTimeDuration-to-dateTime.snap +1 -0
- package/src/qt4-snaps/op-add-dayTimeDuration-to-time.snap +1 -0
- package/src/qt4-snaps/op-add-dayTimeDurations.snap +1 -0
- package/src/qt4-snaps/op-add-yearMonthDuration-to-date.snap +1 -0
- package/src/qt4-snaps/op-add-yearMonthDuration-to-dateTime.snap +1 -0
- package/src/qt4-snaps/op-add-yearMonthDurations.snap +1 -0
- package/src/qt4-snaps/op-anyURI-equal.snap +1 -0
- package/src/qt4-snaps/op-anyURI-greater-than.snap +1 -0
- package/src/qt4-snaps/op-anyURI-less-than.snap +1 -0
- package/src/qt4-snaps/op-bang.snap +1 -0
- package/src/qt4-snaps/op-base64Binary-equal.snap +1 -0
- package/src/qt4-snaps/op-base64Binary-greater-than.snap +1 -0
- package/src/qt4-snaps/op-base64Binary-less-than.snap +1 -0
- package/src/qt4-snaps/op-boolean-equal.snap +1 -0
- package/src/qt4-snaps/op-boolean-greater-than.snap +1 -0
- package/src/qt4-snaps/op-boolean-less-than.snap +1 -0
- package/src/qt4-snaps/op-concat.snap +1 -0
- package/src/qt4-snaps/op-concatenate.snap +1 -0
- package/src/qt4-snaps/op-date-equal.snap +1 -0
- package/src/qt4-snaps/op-date-greater-than.snap +1 -0
- package/src/qt4-snaps/op-date-less-than.snap +1 -0
- package/src/qt4-snaps/op-dateTime-equal.snap +1 -0
- package/src/qt4-snaps/op-dateTime-greater-than.snap +1 -0
- package/src/qt4-snaps/op-dateTime-less-than.snap +1 -0
- package/src/qt4-snaps/op-dayTimeDuration-greater-than.snap +1 -0
- package/src/qt4-snaps/op-dayTimeDuration-less-than.snap +1 -0
- package/src/qt4-snaps/op-divide-dayTimeDuration-by-dayTimeDuration.snap +1 -0
- package/src/qt4-snaps/op-divide-dayTimeDuration.snap +1 -0
- package/src/qt4-snaps/op-divide-yearMonthDuration-by-yearMonthDuration.snap +1 -0
- package/src/qt4-snaps/op-divide-yearMonthDuration.snap +1 -0
- package/src/qt4-snaps/op-duration-equal.snap +1 -0
- package/src/qt4-snaps/op-except.snap +1 -0
- package/src/qt4-snaps/op-gDay-equal.snap +1 -0
- package/src/qt4-snaps/op-gMonth-equal.snap +1 -0
- package/src/qt4-snaps/op-gMonthDay-equal.snap +1 -0
- package/src/qt4-snaps/op-gYear-equal.snap +1 -0
- package/src/qt4-snaps/op-gYearMonth-equal.snap +1 -0
- package/src/qt4-snaps/op-hexBinary-equal.snap +1 -0
- package/src/qt4-snaps/op-hexBinary-greater-than.snap +1 -0
- package/src/qt4-snaps/op-hexBinary-less-than.snap +1 -0
- package/src/qt4-snaps/op-intersect.snap +1 -0
- package/src/qt4-snaps/op-is-same-node.snap +1 -0
- package/src/qt4-snaps/op-multiply-dayTimeDuration.snap +1 -0
- package/src/qt4-snaps/op-multiply-yearMonthDuration.snap +1 -0
- package/src/qt4-snaps/op-node-after.snap +1 -0
- package/src/qt4-snaps/op-node-before.snap +1 -0
- package/src/qt4-snaps/op-numeric-add.snap +1 -0
- package/src/qt4-snaps/op-numeric-divide.snap +1 -0
- package/src/qt4-snaps/op-numeric-equal.snap +1 -0
- package/src/qt4-snaps/op-numeric-greater-than.snap +1 -0
- package/src/qt4-snaps/op-numeric-integer-divide.snap +1 -0
- package/src/qt4-snaps/op-numeric-less-than.snap +1 -0
- package/src/qt4-snaps/op-numeric-mod.snap +1 -0
- package/src/qt4-snaps/op-numeric-multiply.snap +1 -0
- package/src/qt4-snaps/op-numeric-subtract.snap +1 -0
- package/src/qt4-snaps/op-numeric-unary-minus.snap +1 -0
- package/src/qt4-snaps/op-numeric-unary-plus.snap +1 -0
- package/src/qt4-snaps/op-same-key.snap +1 -0
- package/src/qt4-snaps/op-string-equal.snap +1 -0
- package/src/qt4-snaps/op-string-greater-than.snap +1 -0
- package/src/qt4-snaps/op-string-less-than.snap +1 -0
- package/src/qt4-snaps/op-subtract-dateTimes.snap +1 -0
- package/src/qt4-snaps/op-subtract-dates.snap +1 -0
- package/src/qt4-snaps/op-subtract-dayTimeDuration-from-date.snap +1 -0
- package/src/qt4-snaps/op-subtract-dayTimeDuration-from-dateTime.snap +1 -0
- package/src/qt4-snaps/op-subtract-dayTimeDuration-from-time.snap +1 -0
- package/src/qt4-snaps/op-subtract-dayTimeDurations.snap +1 -0
- package/src/qt4-snaps/op-subtract-times.snap +1 -0
- package/src/qt4-snaps/op-subtract-yearMonthDuration-from-date.snap +1 -0
- package/src/qt4-snaps/op-subtract-yearMonthDuration-from-dateTime.snap +1 -0
- package/src/qt4-snaps/op-subtract-yearMonthDurations.snap +1 -0
- package/src/qt4-snaps/op-time-equal.snap +1 -0
- package/src/qt4-snaps/op-time-greater-than.snap +1 -0
- package/src/qt4-snaps/op-time-less-than.snap +1 -0
- package/src/qt4-snaps/op-to.snap +1 -0
- package/src/qt4-snaps/op-union.snap +1 -0
- package/src/qt4-snaps/op-yearMonthDuration-greater-than.snap +1 -0
- package/src/qt4-snaps/op-yearMonthDuration-less-than.snap +1 -0
- package/src/qt4-snaps/prod-AllowingEmpty.snap +1 -0
- package/src/qt4-snaps/prod-Annotation.snap +146 -0
- package/src/qt4-snaps/prod-ArrayType.snap +1 -0
- package/src/qt4-snaps/prod-ArrowExpr.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.abbr.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.ancestor-or-self.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.ancestor.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.following-sibling.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.following.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.preceding-sibling.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.preceding.snap +1 -0
- package/src/qt4-snaps/prod-AxisStep.snap +114 -0
- package/src/qt4-snaps/prod-AxisStep.unabbr.snap +1 -0
- package/src/qt4-snaps/prod-BaseURIDecl.snap +20 -0
- package/src/qt4-snaps/prod-BoundarySpaceDecl.snap +14 -0
- package/src/qt4-snaps/prod-CastExpr.derived.snap +1 -0
- package/src/qt4-snaps/prod-CastExpr.snap +218 -0
- package/src/qt4-snaps/prod-CastableExpr.snap +56 -0
- package/src/qt4-snaps/prod-Comment.snap +1 -0
- package/src/qt4-snaps/prod-CompAttrConstructor.snap +14 -0
- package/src/qt4-snaps/prod-CompCommentConstructor.snap +8 -0
- package/src/qt4-snaps/prod-CompDocConstructor.snap +1 -0
- package/src/qt4-snaps/prod-CompElemConstructor.snap +1 -0
- package/src/qt4-snaps/prod-CompNamespaceConstructor.snap +1 -0
- package/src/qt4-snaps/prod-CompPIConstructor.snap +1 -0
- package/src/qt4-snaps/prod-CompTextConstructor.snap +8 -0
- package/src/qt4-snaps/prod-ConstructionDecl.snap +14 -0
- package/src/qt4-snaps/prod-ContextItemDecl.snap +20 -0
- package/src/qt4-snaps/prod-ContextItemExpr.snap +1 -0
- package/src/qt4-snaps/prod-CopyNamespacesDecl.snap +14 -0
- package/src/qt4-snaps/prod-CountClause.snap +1 -0
- package/src/qt4-snaps/prod-CurlyArrayConstructor.snap +1 -0
- package/src/qt4-snaps/prod-DecimalFormatDecl.snap +92 -0
- package/src/qt4-snaps/prod-DefaultCollationDecl.snap +32 -0
- package/src/qt4-snaps/prod-DefaultNamespaceDecl.snap +92 -0
- package/src/qt4-snaps/prod-DirAttributeList.snap +58 -0
- package/src/qt4-snaps/prod-DirElemConstructor.snap +62 -0
- package/src/qt4-snaps/prod-DirElemContent.namespace.snap +176 -0
- package/src/qt4-snaps/prod-DirElemContent.snap +14 -0
- package/src/qt4-snaps/prod-DirElemContent.whitespace.snap +178 -0
- package/src/qt4-snaps/prod-DirectConstructor.snap +56 -0
- package/src/qt4-snaps/prod-EQName.snap +48 -0
- package/src/qt4-snaps/prod-EmptyOrderDecl.snap +14 -0
- package/src/qt4-snaps/prod-ExtensionExpr.snap +50 -0
- package/src/qt4-snaps/prod-ForClause.snap +158 -0
- package/src/qt4-snaps/prod-FunctionCall.snap +102 -0
- package/src/qt4-snaps/prod-FunctionDecl.snap +256 -0
- package/src/qt4-snaps/prod-GeneralComp.eq.snap +1 -0
- package/src/qt4-snaps/prod-GeneralComp.ge.snap +1 -0
- package/src/qt4-snaps/prod-GeneralComp.gt.snap +1 -0
- package/src/qt4-snaps/prod-GeneralComp.le.snap +1 -0
- package/src/qt4-snaps/prod-GeneralComp.lt.snap +1 -0
- package/src/qt4-snaps/prod-GeneralComp.ne.snap +1 -0
- package/src/qt4-snaps/prod-GroupByClause.snap +8 -0
- package/src/qt4-snaps/prod-IfExpr.snap +1 -0
- package/src/qt4-snaps/prod-InlineFunctionExpr.snap +14 -0
- package/src/qt4-snaps/prod-InstanceofExpr.snap +38 -0
- package/src/qt4-snaps/prod-LetClause.snap +40 -0
- package/src/qt4-snaps/prod-Literal.snap +68 -0
- package/src/qt4-snaps/prod-Lookup.snap +1 -0
- package/src/qt4-snaps/prod-MapConstructor.snap +1 -0
- package/src/qt4-snaps/prod-MapType.snap +8 -0
- package/src/qt4-snaps/prod-ModuleImport.snap +224 -0
- package/src/qt4-snaps/prod-NameTest.snap +164 -0
- package/src/qt4-snaps/prod-NamedFunctionRef.snap +1 -0
- package/src/qt4-snaps/prod-NamespaceDecl.snap +80 -0
- package/src/qt4-snaps/prod-NodeTest.snap +50 -0
- package/src/qt4-snaps/prod-OptionDecl.serialization.snap +14 -0
- package/src/qt4-snaps/prod-OptionDecl.snap +20 -0
- package/src/qt4-snaps/prod-OrExpr.snap +1 -0
- package/src/qt4-snaps/prod-OrderByClause.snap +20 -0
- package/src/qt4-snaps/prod-OrderingModeDecl.snap +14 -0
- package/src/qt4-snaps/prod-ParenthesizedExpr.snap +1 -0
- package/src/qt4-snaps/prod-PathExpr.snap +34 -0
- package/src/qt4-snaps/prod-PositionalVar.snap +26 -0
- package/src/qt4-snaps/prod-Predicate.snap +14 -0
- package/src/qt4-snaps/prod-QuantifiedExpr.snap +164 -0
- package/src/qt4-snaps/prod-ReturnClause.snap +8 -0
- package/src/qt4-snaps/prod-SequenceType.snap +1 -0
- package/src/qt4-snaps/prod-SquareArrayConstructor.snap +1 -0
- package/src/qt4-snaps/prod-StepExpr.snap +1 -0
- package/src/qt4-snaps/prod-StringConstructor.snap +26 -0
- package/src/qt4-snaps/prod-SwitchExpr.snap +1 -0
- package/src/qt4-snaps/prod-TreatExpr.snap +14 -0
- package/src/qt4-snaps/prod-TryCatchExpr.snap +38 -0
- package/src/qt4-snaps/prod-TypeswitchExpr.snap +50 -0
- package/src/qt4-snaps/prod-UnaryLookup.snap +1 -0
- package/src/qt4-snaps/prod-UnorderedExpr.snap +14 -0
- package/src/qt4-snaps/prod-ValueComp.snap +1 -0
- package/src/qt4-snaps/prod-VarDecl.external.snap +82 -0
- package/src/qt4-snaps/prod-VarDecl.snap +146 -0
- package/src/qt4-snaps/prod-VarDefaultValue.snap +8 -0
- package/src/qt4-snaps/prod-VersionDecl.snap +68 -0
- package/src/qt4-snaps/prod-WhereClause.snap +26 -0
- package/src/qt4-snaps/prod-WindowClause.snap +98 -0
- package/src/qt4-snaps/ser-method-adaptive.snap +1 -0
- package/src/qt4-snaps/ser-method-html.snap +1 -0
- package/src/qt4-snaps/ser-method-xml.snap +1 -0
- package/src/qt4-snaps/upd-AdditionalTyping.snap +1 -0
- package/src/qt4-snaps/upd-AddressBookUpdates.snap +1 -0
- package/src/qt4-snaps/upd-AttrDataModelErrs.snap +1 -0
- package/src/qt4-snaps/upd-CommaExpression.snap +1 -0
- package/src/qt4-snaps/upd-Compatibility.snap +1 -0
- package/src/qt4-snaps/upd-ConditionalExpression.snap +1 -0
- package/src/qt4-snaps/upd-DeleteExpressions.snap +1 -0
- package/src/qt4-snaps/upd-FLWORExpression.snap +1 -0
- package/src/qt4-snaps/upd-FullAxis.snap +1 -0
- package/src/qt4-snaps/upd-FunctionCall.snap +1 -0
- package/src/qt4-snaps/upd-FunctionDeclaration.snap +114 -0
- package/src/qt4-snaps/upd-InsertExpressions.snap +1 -0
- package/src/qt4-snaps/upd-MinOther.snap +1 -0
- package/src/qt4-snaps/upd-NSBindingConflictErrs.snap +1 -0
- package/src/qt4-snaps/upd-NamespacesUpdates.snap +1 -0
- package/src/qt4-snaps/upd-NilUpdates.snap +10 -0
- package/src/qt4-snaps/upd-OtherExpressions.snap +1 -0
- package/src/qt4-snaps/upd-ParenthesizedExpressions.snap +1 -0
- package/src/qt4-snaps/upd-PartsUpdates.snap +1 -0
- package/src/qt4-snaps/upd-RelationalDataUpdates.snap +1 -0
- package/src/qt4-snaps/upd-RenameExpressions.snap +1 -0
- package/src/qt4-snaps/upd-ReplaceNode.snap +1 -0
- package/src/qt4-snaps/upd-ReplaceValue.snap +1 -0
- package/src/qt4-snaps/upd-RevalidationDeclarationLax.snap +1 -0
- package/src/qt4-snaps/upd-RevalidationDeclarationLaxUnsupported.snap +1 -0
- package/src/qt4-snaps/upd-RevalidationDeclarationSkip.snap +10 -0
- package/src/qt4-snaps/upd-RevalidationDeclarationSkipUnsupported.snap +1 -0
- package/src/qt4-snaps/upd-RevalidationDeclarationStrict.snap +1 -0
- package/src/qt4-snaps/upd-RevalidationDeclarationStrictUnsupported.snap +1 -0
- package/src/qt4-snaps/upd-RevalidationDeclarationStrictandSkip.snap +1 -0
- package/src/qt4-snaps/upd-SoapUpdates.snap +1 -0
- package/src/qt4-snaps/upd-TransformExpressions.snap +1 -0
- package/src/qt4-snaps/upd-TypeswitchExpression.snap +1 -0
- package/src/qt4-snaps/upd-VariableDeclaration.snap +1 -0
- package/src/qt4-snaps/upd-applyUpdates.snap +1 -0
- package/src/qt4-snaps/upd-fnput-document.snap +1 -0
- package/src/qt4-snaps/upd-mergeUpdates.snap +1 -0
- package/src/qt4-snaps/upd-propagateNamespace.snap +1 -0
- package/src/qt4-snaps/upd-setToUntyped.snap +1 -0
- package/src/qt4-snaps/xs-anyAtomicType.snap +1 -0
- package/src/qt4-snaps/xs-anySimpleType.snap +8 -0
- package/src/qt4-snaps/xs-anyURI.snap +34 -0
- package/src/qt4-snaps/xs-base64Binary.snap +1 -0
- package/src/qt4-snaps/xs-dateTimeStamp.snap +1 -0
- package/src/qt4-snaps/xs-double.snap +1 -0
- package/src/qt4-snaps/xs-error.snap +10 -0
- package/src/qt4-snaps/xs-float.snap +1 -0
- package/src/qt4-snaps/xs-hexBinary.snap +1 -0
- package/src/qt4-snaps/xs-normalizedString.snap +1 -0
- package/src/qt4-snaps/xs-notation.snap +1 -0
- package/src/qt4-snaps/xs-numeric.snap +1 -0
- package/src/qt4-snaps/xs-token.snap +1 -0
- package/src/qt4-worker.ts +63 -0
- package/src/runtimes/existdb/cache.xq +83 -0
- package/src/runtimes/existdb/compression.xq +198 -0
- package/src/runtimes/existdb/console.xq +24 -0
- package/src/runtimes/existdb/contentextraction.xq +31 -0
- package/src/runtimes/existdb/counter.xq +30 -0
- package/src/runtimes/existdb/crypto.xq +97 -0
- package/src/runtimes/existdb/datetime.xq +91 -0
- package/src/runtimes/existdb/file.xq +129 -0
- package/src/runtimes/existdb/ft.xq +325 -0
- package/src/runtimes/existdb/httpclient.xq +118 -0
- package/src/runtimes/existdb/image.xq +65 -0
- package/src/runtimes/existdb/inspect.xq +49 -0
- package/src/runtimes/existdb/kwic.xq +24 -0
- package/src/runtimes/existdb/mail.xq +124 -0
- package/src/runtimes/existdb/ngram.xq +57 -0
- package/src/runtimes/existdb/process.xq +8 -0
- package/src/runtimes/existdb/range.xq +171 -0
- package/src/runtimes/existdb/repo.xq +125 -0
- package/src/runtimes/existdb/request.xq +242 -0
- package/src/runtimes/existdb/response.xq +50 -0
- package/src/runtimes/existdb/scheduler.xq +35 -0
- package/src/runtimes/existdb/session.xq +111 -0
- package/src/runtimes/existdb/sm.xq +497 -0
- package/src/runtimes/existdb/sort.xq +59 -0
- package/src/runtimes/existdb/system.xq +267 -0
- package/src/runtimes/existdb/transform.xq +88 -0
- package/src/runtimes/existdb/util.xq +860 -0
- package/src/runtimes/existdb/validation.xq +83 -0
- package/src/runtimes/existdb/xmldb.xq +482 -0
- package/src/runtimes/existdb/xmldiff.xq +22 -0
- package/src/runtimes/fonto/fonto.xq +164 -0
- package/src/runtimes.test.ts +152 -0
- package/src/runtimes.ts +70 -0
- package/src/server.ts +352 -122
- package/src/test-utils.ts +17 -0
- package/src/typechecker.test.ts +548 -0
- package/src/typechecker.ts +416 -0
- package/src/types.ts +41 -7
- package/src/unused-diagnostics.test.ts +174 -0
- package/src/unused-diagnostics.ts +232 -0
- package/tsconfig.json +3 -3
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
module namespace ft = "http://exist-db.org/xquery/lucene";
|
|
2
|
+
|
|
3
|
+
(:~
|
|
4
|
+
: Returns the value of a binary field attached to a particular node obtained
|
|
5
|
+
: via a full text search. Accepts an additional parameter to name the target
|
|
6
|
+
: type into which the field value should be cast. This is mainly relevant for
|
|
7
|
+
: fields having a different type than xs:string. As lucene does not record
|
|
8
|
+
: type information, numbers or dates would be returned as strings by default.
|
|
9
|
+
: @param $node the context node to check for attached fields
|
|
10
|
+
: @param $field name of the field
|
|
11
|
+
: @param $type intended target type to cast the field value to. Empty sequence returns raw (untyped) values as the 2-arg form. Casting may fail with a dynamic error.
|
|
12
|
+
: @return Sequence corresponding to the values of the field attached, cast to the desired target type
|
|
13
|
+
:)
|
|
14
|
+
declare function ft:binary-field($node as node(), $field as xs:string, $type as xs:string?) as item()* external;
|
|
15
|
+
|
|
16
|
+
(:~
|
|
17
|
+
: Close the current Lucene document and flush it to disk. Subsequent calls to
|
|
18
|
+
: ft:index will write to a new Lucene document.
|
|
19
|
+
:)
|
|
20
|
+
declare function ft:close() as empty-sequence() external;
|
|
21
|
+
|
|
22
|
+
(:~
|
|
23
|
+
: Return a map of facet labels and counts for the result of a Lucene query.
|
|
24
|
+
: @param $nodes A sequence of nodes for which facet counts should be returned. If the nodes in the sequence resulted from different Lucene queries, their facet counts will be merged. If no node in the the sequence has facets attached or the sequence is empty, an empty map is returned.
|
|
25
|
+
: @param $dimension The facet dimension. This should correspond to a dimension defined in the index configuration
|
|
26
|
+
: @return A map having the facet label as key and the facet count as value
|
|
27
|
+
:)
|
|
28
|
+
declare function ft:facets($nodes as node()*, $dimension as xs:string) as map(*) external;
|
|
29
|
+
|
|
30
|
+
(:~
|
|
31
|
+
: Return a map of facet labels and counts for the result of a Lucene query.
|
|
32
|
+
: @param $nodes A sequence of nodes for which facet counts should be returned. If the nodes in the sequence resulted from different Lucene queries, their facet counts will be merged. If no node in the the sequence has facets attached or the sequence is empty, an empty map is returned.
|
|
33
|
+
: @param $dimension The facet dimension. This should correspond to a dimension defined in the index configuration
|
|
34
|
+
: @param $count The number of facet labels to be returned. Facets with more occurrences in the result will be returned first.
|
|
35
|
+
: @return A map having the facet label as key and the facet count as value
|
|
36
|
+
:)
|
|
37
|
+
declare function ft:facets($nodes as node()*, $dimension as xs:string, $count as xs:integer?) as map(*) external;
|
|
38
|
+
|
|
39
|
+
(:~
|
|
40
|
+
: Return a map of facet labels and counts for the result of a Lucene query.
|
|
41
|
+
: @param $nodes A sequence of nodes for which facet counts should be returned. If the nodes in the sequence resulted from different Lucene queries, their facet counts will be merged. If no node in the the sequence has facets attached or the sequence is empty, an empty map is returned.
|
|
42
|
+
: @param $dimension The facet dimension. This should correspond to a dimension defined in the index configuration
|
|
43
|
+
: @param $count The number of facet labels to be returned. Facets with more occurrences in the result will be returned first.
|
|
44
|
+
: @param $paths For hierarchical facets, specify a sequence of paths leading to the position in the hierarchy you would like to get facet counts for.
|
|
45
|
+
: @return A map having the facet label as key and the facet count as value
|
|
46
|
+
:)
|
|
47
|
+
declare function ft:facets(
|
|
48
|
+
$nodes as node()*,
|
|
49
|
+
$dimension as xs:string,
|
|
50
|
+
$count as xs:integer?,
|
|
51
|
+
$paths as xs:string+
|
|
52
|
+
) as map(*) external;
|
|
53
|
+
|
|
54
|
+
(:~
|
|
55
|
+
: Returns the value of a field attached to a particular node obtained via a
|
|
56
|
+
: full text search. The $type parameter allows you to name the target type
|
|
57
|
+
: into which the field value should be cast. This is mainly relevant for
|
|
58
|
+
: fields having a different type than xs:string. As lucene does not record
|
|
59
|
+
: type information, numbers or dates would be returned as strings by default.
|
|
60
|
+
: @param $node the context node to check for attached fields
|
|
61
|
+
: @param $field name of the field
|
|
62
|
+
: @return Sequence corresponding to the values of the field attached, cast to the desired target type
|
|
63
|
+
:)
|
|
64
|
+
declare function ft:field($node as node(), $field as xs:string) as item()* external;
|
|
65
|
+
|
|
66
|
+
(:~
|
|
67
|
+
: Returns the value of a field attached to a particular node obtained via a
|
|
68
|
+
: full text search. The $type parameter allows you to name the target type
|
|
69
|
+
: into which the field value should be cast. This is mainly relevant for
|
|
70
|
+
: fields having a different type than xs:string. As lucene does not record
|
|
71
|
+
: type information, numbers or dates would be returned as strings by default.
|
|
72
|
+
: @param $node the context node to check for attached fields
|
|
73
|
+
: @param $field name of the field
|
|
74
|
+
: @param $type intended target type to cast the field value to. Empty sequence returns raw (untyped) values as the 2-arg form. Casting may fail with a dynamic error.
|
|
75
|
+
: @return Sequence corresponding to the values of the field attached, cast to the desired target type
|
|
76
|
+
:)
|
|
77
|
+
declare function ft:field($node as node(), $field as xs:string, $type as xs:string?) as item()* external;
|
|
78
|
+
|
|
79
|
+
(:~
|
|
80
|
+
: Retrieve the stored content of a field.
|
|
81
|
+
: @deprecated Use an index definition with nested fields and ft:field instead
|
|
82
|
+
: @param $path URI paths of documents or collections in database. Collection URIs should end on a '/'.
|
|
83
|
+
: @param $field query string
|
|
84
|
+
: @return All documents that are match by the query
|
|
85
|
+
:)
|
|
86
|
+
declare function ft:get-field($path as xs:string*, $field as xs:string) as xs:string* external;
|
|
87
|
+
|
|
88
|
+
(:~
|
|
89
|
+
: Check if the given document has a lucene index defined on it. This method
|
|
90
|
+
: will return true for both, indexes created via collection.xconf or manual
|
|
91
|
+
: index fields added to the document with ft:index.
|
|
92
|
+
: @param $path Full path to the resource to check
|
|
93
|
+
:)
|
|
94
|
+
declare function ft:has-index($path as xs:string) as xs:boolean* external;
|
|
95
|
+
|
|
96
|
+
(:~
|
|
97
|
+
: Highlights matches for the last executed lucene query within the value of a
|
|
98
|
+
: field attached to a particular node obtained via a full text search. Only
|
|
99
|
+
: fields listed in the 'fields' option of ft:query will be available to
|
|
100
|
+
: highlighting. Accepts zero or more nodes; empty input returns empty.
|
|
101
|
+
: @param $nodes zero or more context nodes (empty returns empty)
|
|
102
|
+
: @param $field name of the field
|
|
103
|
+
: @return exist:field elements with matches enclosed in exist:match
|
|
104
|
+
:)
|
|
105
|
+
declare function ft:highlight-field-matches($nodes as node()*, $field as xs:string) as element()* external;
|
|
106
|
+
|
|
107
|
+
(:~
|
|
108
|
+
: Index an arbitrary chunk of (non-XML) data with Lucene. Syntax is inspired
|
|
109
|
+
: by Solr.
|
|
110
|
+
: @param $documentPath URI path of document in database.
|
|
111
|
+
: @param $solrExression XML syntax expected by Solr's add expression. Element should be called 'doc', e.g. <doc> <field name="field1">data1</field> <field name="field2" boost="value">data2</field> </doc>
|
|
112
|
+
:)
|
|
113
|
+
declare function ft:index($documentPath as xs:string, $solrExression as node()) as empty-sequence() external;
|
|
114
|
+
|
|
115
|
+
(:~
|
|
116
|
+
: Index an arbitrary chunk of (non-XML) data with Lucene. Syntax is inspired
|
|
117
|
+
: by Solr.
|
|
118
|
+
: @param $documentPath URI path of document in database.
|
|
119
|
+
: @param $solrExression XML syntax expected by Solr's add expression. Element should be called 'doc', e.g. <doc> <field name="field1">data1</field> <field name="field2" boost="value">data2</field> </doc>
|
|
120
|
+
: @param $close If true, close the Lucene document. Subsequent calls to ft:index will thus add to a new Lucene document. If false, the document remains open and is not flushed to disk. Call the ft:close function to explicitely close and flush the current document.
|
|
121
|
+
:)
|
|
122
|
+
declare function ft:index(
|
|
123
|
+
$documentPath as xs:string,
|
|
124
|
+
$solrExression as node(),
|
|
125
|
+
$close as xs:boolean
|
|
126
|
+
) as empty-sequence() external;
|
|
127
|
+
|
|
128
|
+
(:~
|
|
129
|
+
: Similar to the util:index-keys functions, but returns index entries for a
|
|
130
|
+
: field associated with a lucene index.
|
|
131
|
+
: @param $field The name of the field
|
|
132
|
+
: @param $start-value Only keys starting with the given prefix are reported.
|
|
133
|
+
: @param $function-reference A function reference. It can be an arbitrary user-defined function, but it should take exactly 2 arguments:
|
|
134
|
+
: @param $max-number-returned The maximum number of keys to return
|
|
135
|
+
: @return the results of the eval of the $function-reference
|
|
136
|
+
:)
|
|
137
|
+
declare function ft:index-keys-for-field(
|
|
138
|
+
$field as xs:string,
|
|
139
|
+
$start-value as xs:string?,
|
|
140
|
+
$function-reference as function(*),
|
|
141
|
+
$max-number-returned as xs:integer?
|
|
142
|
+
) as item()* external;
|
|
143
|
+
|
|
144
|
+
(:~
|
|
145
|
+
: Calls Lucene's optimize method to merge all index segments into a single
|
|
146
|
+
: one. This is a costly operation and should not be used except for data sets
|
|
147
|
+
: which can be expected to remain unchanged for a while. The optimize will
|
|
148
|
+
: block the index for other write operations and may take some time. You need
|
|
149
|
+
: to be a user in group dba to call this function.
|
|
150
|
+
:)
|
|
151
|
+
declare function ft:optimize() as empty-sequence() external;
|
|
152
|
+
|
|
153
|
+
(:~
|
|
154
|
+
: Queries a node set using a Lucene full text index; a lucene index must
|
|
155
|
+
: already be defined on the nodes, because if no index is available on a node,
|
|
156
|
+
: nothing will be found. Indexes on descendant nodes are not used. The context
|
|
157
|
+
: of the Lucene query is determined by the given input node set. The query is
|
|
158
|
+
: specified either as a query string based on Lucene's default query syntax or
|
|
159
|
+
: as an XML fragment. See https://exist-db.org/exist/apps/doc/lucene.xml#query
|
|
160
|
+
: for complete documentation.
|
|
161
|
+
: @param $nodes The node set to search using a Lucene full text index which is defined on those nodes
|
|
162
|
+
: @param $query The query to search for, provided either as a string or text in Lucene's default query syntax or as an XML fragment to bypass Lucene's default query parser
|
|
163
|
+
: @return all nodes from the input node set matching the query. match highlighting information will be available for all returned nodes. Lucene's match score can be retrieved via the ft:score function.
|
|
164
|
+
:)
|
|
165
|
+
declare function ft:query($nodes as node()*, $query as item()?) as node()* external;
|
|
166
|
+
|
|
167
|
+
(:~
|
|
168
|
+
: Queries a node set using a Lucene full text index; a lucene index must
|
|
169
|
+
: already be defined on the nodes, because if no index is available on a node,
|
|
170
|
+
: nothing will be found. Indexes on descendant nodes are not used. The context
|
|
171
|
+
: of the Lucene query is determined by the given input node set. The query is
|
|
172
|
+
: specified either as a query string based on Lucene's default query syntax or
|
|
173
|
+
: as an XML fragment. See https://exist-db.org/exist/apps/doc/lucene.xml#query
|
|
174
|
+
: for complete documentation.
|
|
175
|
+
: @param $nodes The node set to search using a Lucene full text index which is defined on those nodes
|
|
176
|
+
: @param $query The query to search for, provided either as a string or text in Lucene's default query syntax or as an XML fragment to bypass Lucene's default query parser
|
|
177
|
+
: @param $options An XML fragment or XDM Map containing options to be passed to Lucene's query parser. The following options are supported (a description can be found in the docs): <options> <default-operator>and|or</default-operator> <phrase-slop>number</phrase-slop> <leading-wildcard>yes|no</leading-wildcard> <filter-rewrite>yes|no</filter-rewrite> <lowercase-expanded-terms>yes|no</lowercase-expanded-terms> </options>
|
|
178
|
+
: @return all nodes from the input node set matching the query. match highlighting information will be available for all returned nodes. Lucene's match score can be retrieved via the ft:score function.
|
|
179
|
+
:)
|
|
180
|
+
declare function ft:query($nodes as node()*, $query as item()?, $options as item()?) as node()* external;
|
|
181
|
+
|
|
182
|
+
(:~
|
|
183
|
+
: Queries a Lucene field, which has to be explicitely created in the index
|
|
184
|
+
: configuration.
|
|
185
|
+
: @param $field The lucene field name.
|
|
186
|
+
: @param $query The query to search for, provided either as a string or text in Lucene's default query syntax or as an XML fragment to bypass Lucene's default query parser
|
|
187
|
+
: @return all nodes from the input node set matching the query. match highlighting information will be available for all returned nodes. Lucene's match score can be retrieved via the ft:score function.
|
|
188
|
+
:)
|
|
189
|
+
declare function ft:query-field($field as xs:string*, $query as item()) as node()* external;
|
|
190
|
+
|
|
191
|
+
(:~
|
|
192
|
+
: Queries a Lucene field, which has to be explicitely created in the index
|
|
193
|
+
: configuration.
|
|
194
|
+
: @param $field The lucene field name.
|
|
195
|
+
: @param $query The query to search for, provided either as a string or text in Lucene's default query syntax or as an XML fragment to bypass Lucene's default query parser
|
|
196
|
+
: @param $options An XML fragment or XDM Map containing options to be passed to Lucene's query parser. The following options are supported (a description can be found in the docs): <options> <default-operator>and|or</default-operator> <phrase-slop>number</phrase-slop> <leading-wildcard>yes|no</leading-wildcard> <filter-rewrite>yes|no</filter-rewrite> </options>
|
|
197
|
+
: @return all nodes from the input node set matching the query. match highlighting information will be available for all returned nodes. Lucene's match score can be retrieved via the ft:score function.
|
|
198
|
+
:)
|
|
199
|
+
declare function ft:query-field($field as xs:string*, $query as item(), $options as item()?) as node()* external;
|
|
200
|
+
|
|
201
|
+
(:~
|
|
202
|
+
: KNN vector search by field name. Uses context document set.
|
|
203
|
+
: @param $field The vector field name (from vector-field config).
|
|
204
|
+
: @param $vector Query vector as XQuery array of numbers.
|
|
205
|
+
: @return Nodes matching the vector query.
|
|
206
|
+
:)
|
|
207
|
+
declare function ft:query-field-vector($field as xs:string, $vector as array(*)) as node()* external;
|
|
208
|
+
|
|
209
|
+
(:~
|
|
210
|
+
: KNN vector search by field with explicit k.
|
|
211
|
+
: @param $field The vector field name (from vector-field config).
|
|
212
|
+
: @param $vector Query vector as XQuery array of numbers.
|
|
213
|
+
: @param $k Number of nearest neighbours (default 10).
|
|
214
|
+
: @return Nodes matching the vector query.
|
|
215
|
+
:)
|
|
216
|
+
declare function ft:query-field-vector($field as xs:string, $vector as array(*), $k as xs:integer?) as node()* external;
|
|
217
|
+
|
|
218
|
+
(:~
|
|
219
|
+
: KNN vector search by field with k and options.
|
|
220
|
+
: @param $field The vector field name (from vector-field config).
|
|
221
|
+
: @param $vector Query vector as XQuery array of numbers.
|
|
222
|
+
: @param $k Number of nearest neighbours (default 10).
|
|
223
|
+
: @param $options Optional map with filter-query, filter, facets.
|
|
224
|
+
: @return Nodes matching the vector query.
|
|
225
|
+
:)
|
|
226
|
+
declare function ft:query-field-vector(
|
|
227
|
+
$field as xs:string,
|
|
228
|
+
$vector as array(*),
|
|
229
|
+
$k as xs:integer?,
|
|
230
|
+
$options as item()?
|
|
231
|
+
) as node()* external;
|
|
232
|
+
|
|
233
|
+
(:~
|
|
234
|
+
: KNN vector search. Returns k nearest nodes. Vector field is resolved from
|
|
235
|
+
: index config.
|
|
236
|
+
: @param $nodes The node set to search (e.g. collection(...)//article). Document set and qnames are derived from this.
|
|
237
|
+
: @param $vector Query vector as XQuery array of numbers, e.g. [1.0, 0.0, 0.0, 0.0].
|
|
238
|
+
: @return Nodes matching the vector query, ordered by similarity.
|
|
239
|
+
:)
|
|
240
|
+
declare function ft:query-vector($nodes as node()*, $vector as array(*)) as node()* external;
|
|
241
|
+
|
|
242
|
+
(:~
|
|
243
|
+
: KNN vector search with explicit k.
|
|
244
|
+
: @param $nodes The node set to search (e.g. collection(...)//article). Document set and qnames are derived from this.
|
|
245
|
+
: @param $vector Query vector as XQuery array of numbers, e.g. [1.0, 0.0, 0.0, 0.0].
|
|
246
|
+
: @param $k Number of nearest neighbours to return (default 10).
|
|
247
|
+
: @return Nodes matching the vector query, ordered by similarity.
|
|
248
|
+
:)
|
|
249
|
+
declare function ft:query-vector($nodes as node()*, $vector as array(*), $k as xs:integer?) as node()* external;
|
|
250
|
+
|
|
251
|
+
(:~
|
|
252
|
+
: KNN vector search with k and options (filter-query, filter, facets).
|
|
253
|
+
: @param $nodes The node set to search (e.g. collection(...)//article). Document set and qnames are derived from this.
|
|
254
|
+
: @param $vector Query vector as XQuery array of numbers, e.g. [1.0, 0.0, 0.0, 0.0].
|
|
255
|
+
: @param $k Number of nearest neighbours to return (default 10).
|
|
256
|
+
: @param $options Optional map with filter-query, filter, facets.
|
|
257
|
+
: @return Nodes matching the vector query, ordered by similarity.
|
|
258
|
+
:)
|
|
259
|
+
declare function ft:query-vector(
|
|
260
|
+
$nodes as node()*,
|
|
261
|
+
$vector as array(*),
|
|
262
|
+
$k as xs:integer?,
|
|
263
|
+
$options as item()?
|
|
264
|
+
) as node()* external;
|
|
265
|
+
|
|
266
|
+
(:~
|
|
267
|
+
: Remove any (non-XML) Lucene index associated with the document identified by
|
|
268
|
+
: the path parameter. This function will only remove indexes which were
|
|
269
|
+
: manually created by the user via the ft:index function. Indexes defined in
|
|
270
|
+
: collection.xconf will NOT be removed. They are maintained automatically by
|
|
271
|
+
: the database. Please note that non-XML indexes will also be removed
|
|
272
|
+
: automatically if the associated document is deleted.
|
|
273
|
+
: @param $documentPath URI path of document in database.
|
|
274
|
+
:)
|
|
275
|
+
declare function ft:remove-index($documentPath as xs:string) as empty-sequence() external;
|
|
276
|
+
|
|
277
|
+
(:~
|
|
278
|
+
: Returns a computed relevance score for the given node. The score is the sum
|
|
279
|
+
: of all relevance scores provided by Lucene for the node and its descendants.
|
|
280
|
+
: In general, the score will be a number between 0.0 and 1.0 if the query had
|
|
281
|
+
: $node as context. If the query targeted multiple descendants of $node (e.g.
|
|
282
|
+
: 'title' and 'author' within a 'book'), the score will be the sum of all
|
|
283
|
+
: sub-scores and may thus be greater than 1.
|
|
284
|
+
: @param $node the context node
|
|
285
|
+
: @return sum of all relevance scores provided by Lucene for all matches below the given context node
|
|
286
|
+
:)
|
|
287
|
+
declare function ft:score($node as node()) as xs:float* external;
|
|
288
|
+
|
|
289
|
+
(:~
|
|
290
|
+
: Search for (non-XML) data with lucene
|
|
291
|
+
: @param $query query string
|
|
292
|
+
: @return All documents that are match by the query
|
|
293
|
+
:)
|
|
294
|
+
declare function ft:search($query as xs:string) as node() external;
|
|
295
|
+
|
|
296
|
+
(:~
|
|
297
|
+
: Search for (non-XML) data with lucene
|
|
298
|
+
: @param $path URI paths of documents or collections in database. Collection URIs should end on a '/'.
|
|
299
|
+
: @param $query query string
|
|
300
|
+
: @return All documents that are match by the query
|
|
301
|
+
:)
|
|
302
|
+
declare function ft:search($path as xs:string*, $query as xs:string) as node() external;
|
|
303
|
+
|
|
304
|
+
(:~
|
|
305
|
+
: Search for (non-XML) data with lucene
|
|
306
|
+
: @param $path URI paths of documents or collections in database. Collection URIs should end on a '/'.
|
|
307
|
+
: @param $query query string
|
|
308
|
+
: @param $fields Fields to return in search results
|
|
309
|
+
: @return All documents that are match by the query
|
|
310
|
+
:)
|
|
311
|
+
declare function ft:search($path as xs:string*, $query as xs:string, $fields as xs:string*) as node() external;
|
|
312
|
+
|
|
313
|
+
(:~
|
|
314
|
+
: Search for (non-XML) data with lucene
|
|
315
|
+
: @param $path URI paths of documents or collections in database. Collection URIs should end on a '/'.
|
|
316
|
+
: @param $query query string
|
|
317
|
+
: @param $fields Fields to return in search results
|
|
318
|
+
: @return All documents that are match by the query
|
|
319
|
+
:)
|
|
320
|
+
declare function ft:search(
|
|
321
|
+
$path as xs:string*,
|
|
322
|
+
$query as xs:string,
|
|
323
|
+
$fields as xs:string*,
|
|
324
|
+
$options as node()?
|
|
325
|
+
) as node() external;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
module namespace httpclient = "http://exist-db.org/xquery/httpclient";
|
|
2
|
+
|
|
3
|
+
(:~
|
|
4
|
+
: Sends an HTTP GET request to the given URI and returns the response.
|
|
5
|
+
: @param $uri The URI to request
|
|
6
|
+
: @param $persist If true, keep the HTTP connection alive for subsequent requests
|
|
7
|
+
: @param $request-headers A sequence of header elements, or the empty sequence
|
|
8
|
+
:)
|
|
9
|
+
declare function httpclient:get(
|
|
10
|
+
$uri as xs:anyURI,
|
|
11
|
+
$persist as xs:boolean,
|
|
12
|
+
$request-headers as element()?
|
|
13
|
+
) as element() external;
|
|
14
|
+
|
|
15
|
+
(:~
|
|
16
|
+
: Sends an HTTP HEAD request to the given URI.
|
|
17
|
+
: @param $uri The URI to request
|
|
18
|
+
: @param $persist If true, keep the HTTP connection alive
|
|
19
|
+
: @param $request-headers A sequence of header elements, or the empty sequence
|
|
20
|
+
:)
|
|
21
|
+
declare function httpclient:head(
|
|
22
|
+
$uri as xs:anyURI,
|
|
23
|
+
$persist as xs:boolean,
|
|
24
|
+
$request-headers as element()?
|
|
25
|
+
) as element() external;
|
|
26
|
+
|
|
27
|
+
(:~
|
|
28
|
+
: Sends an HTTP POST request to the given URI with the given body.
|
|
29
|
+
: @param $uri The URI to request
|
|
30
|
+
: @param $content The request body (node or xs:string)
|
|
31
|
+
: @param $persist If true, keep the HTTP connection alive
|
|
32
|
+
: @param $request-headers A sequence of header elements, or the empty sequence
|
|
33
|
+
:)
|
|
34
|
+
declare function httpclient:post(
|
|
35
|
+
$uri as xs:anyURI,
|
|
36
|
+
$content as item(),
|
|
37
|
+
$persist as xs:boolean,
|
|
38
|
+
$request-headers as element()?
|
|
39
|
+
) as element() external;
|
|
40
|
+
|
|
41
|
+
(:~
|
|
42
|
+
: Sends an HTTP POST request with a named content type.
|
|
43
|
+
: @param $uri The URI to request
|
|
44
|
+
: @param $content The request body
|
|
45
|
+
: @param $persist If true, keep the HTTP connection alive
|
|
46
|
+
: @param $request-headers Request headers element
|
|
47
|
+
: @param $content-type The Content-Type header value
|
|
48
|
+
:)
|
|
49
|
+
declare function httpclient:post(
|
|
50
|
+
$uri as xs:anyURI,
|
|
51
|
+
$content as item(),
|
|
52
|
+
$persist as xs:boolean,
|
|
53
|
+
$request-headers as element()?,
|
|
54
|
+
$content-type as xs:string
|
|
55
|
+
) as element() external;
|
|
56
|
+
|
|
57
|
+
(:~
|
|
58
|
+
: Sends an HTTP PUT request to the given URI.
|
|
59
|
+
: @param $uri The URI to request
|
|
60
|
+
: @param $content The request body
|
|
61
|
+
: @param $persist If true, keep the HTTP connection alive
|
|
62
|
+
: @param $request-headers Request headers element
|
|
63
|
+
:)
|
|
64
|
+
declare function httpclient:put(
|
|
65
|
+
$uri as xs:anyURI,
|
|
66
|
+
$content as item(),
|
|
67
|
+
$persist as xs:boolean,
|
|
68
|
+
$request-headers as element()?
|
|
69
|
+
) as element() external;
|
|
70
|
+
|
|
71
|
+
(:~
|
|
72
|
+
: Sends an HTTP DELETE request to the given URI.
|
|
73
|
+
: @param $uri The URI to request
|
|
74
|
+
: @param $persist If true, keep the HTTP connection alive
|
|
75
|
+
: @param $request-headers Request headers element
|
|
76
|
+
:)
|
|
77
|
+
declare function httpclient:delete(
|
|
78
|
+
$uri as xs:anyURI,
|
|
79
|
+
$persist as xs:boolean,
|
|
80
|
+
$request-headers as element()?
|
|
81
|
+
) as element() external;
|
|
82
|
+
|
|
83
|
+
(:~
|
|
84
|
+
: Sends an HTTP OPTIONS request to the given URI.
|
|
85
|
+
: @param $uri The URI to request
|
|
86
|
+
: @param $persist If true, keep the HTTP connection alive
|
|
87
|
+
: @param $request-headers Request headers element
|
|
88
|
+
:)
|
|
89
|
+
declare function httpclient:options(
|
|
90
|
+
$uri as xs:anyURI,
|
|
91
|
+
$persist as xs:boolean,
|
|
92
|
+
$request-headers as element()?
|
|
93
|
+
) as element() external;
|
|
94
|
+
|
|
95
|
+
(:~
|
|
96
|
+
: Sends an HTTP PATCH request to the given URI.
|
|
97
|
+
: @param $uri The URI to request
|
|
98
|
+
: @param $content The request body
|
|
99
|
+
: @param $persist If true, keep the HTTP connection alive
|
|
100
|
+
: @param $request-headers Request headers element
|
|
101
|
+
:)
|
|
102
|
+
declare function httpclient:patch(
|
|
103
|
+
$uri as xs:anyURI,
|
|
104
|
+
$content as item(),
|
|
105
|
+
$persist as xs:boolean,
|
|
106
|
+
$request-headers as element()?
|
|
107
|
+
) as element() external;
|
|
108
|
+
|
|
109
|
+
(:~
|
|
110
|
+
: Clears all persistent HTTP connections maintained by the client.
|
|
111
|
+
:)
|
|
112
|
+
declare function httpclient:clear-response-cache() as empty-sequence() external;
|
|
113
|
+
|
|
114
|
+
(:~
|
|
115
|
+
: Encodes a string for use in a URL (percent-encoding).
|
|
116
|
+
: @param $string The string to encode
|
|
117
|
+
:)
|
|
118
|
+
declare function httpclient:encode-url($string as xs:string) as xs:string external;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
module namespace image = "http://exist-db.org/xquery/image";
|
|
2
|
+
|
|
3
|
+
(:~
|
|
4
|
+
: Crop the image $image to a specified dimension. If no dimensions are
|
|
5
|
+
: specified, then the default values are 'y1 = 0', 'x1 = 0', 'x2 = 100' and
|
|
6
|
+
: 'y2 = 100'.
|
|
7
|
+
: @param $image The image data
|
|
8
|
+
: @param $mimeType The mime-type of the image
|
|
9
|
+
: @return the cropd image or an empty sequence if $image is invalid
|
|
10
|
+
:)
|
|
11
|
+
declare function image:crop(
|
|
12
|
+
$image as xs:base64Binary,
|
|
13
|
+
$dimension as xs:integer*,
|
|
14
|
+
$mimeType as xs:string
|
|
15
|
+
) as xs:base64Binary? external;
|
|
16
|
+
|
|
17
|
+
(:~
|
|
18
|
+
: Gets the Height of the image passed in, returning an integer of the images
|
|
19
|
+
: Height in pixels or an empty sequence if the image is invalid.
|
|
20
|
+
: @param $image The image data
|
|
21
|
+
: @return the height in pixels
|
|
22
|
+
:)
|
|
23
|
+
declare function image:get-height($image as xs:base64Binary) as xs:integer? external;
|
|
24
|
+
|
|
25
|
+
(:~
|
|
26
|
+
: Gets the width of the image passed in, returning an integer of the images
|
|
27
|
+
: width in pixels or an empty sequence if the image is invalid.
|
|
28
|
+
: @param $image The image data
|
|
29
|
+
: @return the width in pixels
|
|
30
|
+
:)
|
|
31
|
+
declare function image:get-width($image as xs:base64Binary) as xs:integer? external;
|
|
32
|
+
|
|
33
|
+
(:~
|
|
34
|
+
: @param $image The image data
|
|
35
|
+
: @param $options A map of options for transforming the image. The map should be formatted like: map { 'source': map { 'media-type': xs:string }, 'destination': map { 'max-height': xs:integer?, 'max-width': xs:integer?, 'rendering-hints': map { $image:alpha-interpolation: ($image:alpha-interpolation_default|$image:alpha-interpolation_speed|$image:alpha-interpolation_default)?, $image:antialiasing: ($image:antialiasing_default|$image:antialiasing_on|$image:antialiasing_off)?, $image:color-rendering: ($image:color-rendering_default|$image:color-rendering_speed|$image:color-rendering_quality)?, $image:dithering: ($image:dithering_default|$image:dithering_enable|$image:dithering_disable)?, $image:fractional-metrics: ($image:fractional-metrics_default|$image:fractional-metrics_on|$image:fractional-metrics_off)?, $image:interpolation: ($image:interpolation_nearest_neighbor|$image:interpolation_bilinear|$image:interpolation_bicubic)?, $image:rendering: ($image:rendering_default|$image:rendering_speed|$image:rendering_quality)?, $image:resolution-variant: ($image:resolution-variant_default|$image:resolution-variant_base|$image:resolution-variant_size_fit|$image:resolution-variant_dpi_fit)?, $image:stroke-control: ($image:stroke-control_default|$image:stroke-control_normalize|$image:stroke-control_pure)?, $image:text-antialiasing: ($image:text-antialiasing_default|$image:text-antialiasing_on|$image:text-antialiasing_off|$image:text-antialiasing_gasp|$image:text-antialiasing_lcd_hrgb|$image:text-antialiasing_lcd_hbgr|$image:text-antialiasing_lcd_vrgb|$image:text-antialiasing_lcd_vbgr)? }?}
|
|
36
|
+
: @return the scaled image or an empty sequence if $image is invalid
|
|
37
|
+
:)
|
|
38
|
+
declare function image:scale($image as xs:base64Binary, $options as map(*)) as xs:base64Binary? external;
|
|
39
|
+
|
|
40
|
+
(:~
|
|
41
|
+
: @param $image The image data
|
|
42
|
+
: @param $dimension The maximum dimension of the scaled image. expressed in pixels (maxheight, maxwidth). If empty, then the default values are 'maxheight = 100' and 'maxwidth = 100'.
|
|
43
|
+
: @param $media-type The mime-type of the image
|
|
44
|
+
: @return the scaled image or an empty sequence if $image is invalid
|
|
45
|
+
:)
|
|
46
|
+
declare function image:scale(
|
|
47
|
+
$image as xs:base64Binary,
|
|
48
|
+
$dimension as xs:integer*,
|
|
49
|
+
$media-type as xs:string
|
|
50
|
+
) as xs:base64Binary? external;
|
|
51
|
+
|
|
52
|
+
(:~
|
|
53
|
+
: Generate thumbnails from the given database collection
|
|
54
|
+
: @param $collection The URI to the collection
|
|
55
|
+
: @param $thumbnail-location The location in the database where the thumbnails should be created, this can be a local path, with the prefix 'xmldb:' a absolute path within the database or with 'rel:' path relative to the given $collection. You can leave this empty then the default is 'rel:/thumbs'.
|
|
56
|
+
: @param $dimension The dimension of the thumbnails, if empty then the default values are 'maxheight = 100' and 'maxwidth = 100', the first value is 'maxheight' and the second 'maxwidth'.
|
|
57
|
+
: @param $prefix The prefix to append to the thumbnail filenames
|
|
58
|
+
: @return the result
|
|
59
|
+
:)
|
|
60
|
+
declare function image:thumbnail(
|
|
61
|
+
$collection as xs:anyURI,
|
|
62
|
+
$thumbnail-location as xs:anyURI?,
|
|
63
|
+
$dimension as xs:integer*,
|
|
64
|
+
$prefix as xs:string?
|
|
65
|
+
) as xs:string* external;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module namespace inspect = "http://exist-db.org/xquery/inspection";
|
|
2
|
+
|
|
3
|
+
(:~
|
|
4
|
+
: Returns an XML fragment describing the function referenced by the passed
|
|
5
|
+
: function item.
|
|
6
|
+
: @param $function The function item to inspect
|
|
7
|
+
: @return the signature of the function
|
|
8
|
+
:)
|
|
9
|
+
declare function inspect:inspect-function($function as function(*)) as node() external;
|
|
10
|
+
|
|
11
|
+
(:~
|
|
12
|
+
: Compiles a library module from source (without importing it) and returns an
|
|
13
|
+
: XML fragment describing the module and the functions/variables contained in
|
|
14
|
+
: it.
|
|
15
|
+
: @param $location The location URI of the module to inspect
|
|
16
|
+
:)
|
|
17
|
+
declare function inspect:inspect-module($location as xs:anyURI) as item()* external;
|
|
18
|
+
|
|
19
|
+
(:~
|
|
20
|
+
: Returns an XML fragment describing the library module identified by the
|
|
21
|
+
: given namespace URI and the functions/variables contained in it.
|
|
22
|
+
: @param $uri The namespace URI of the module to inspect
|
|
23
|
+
:)
|
|
24
|
+
declare function inspect:inspect-module-uri($uri as xs:anyURI) as item()* external;
|
|
25
|
+
|
|
26
|
+
(:~
|
|
27
|
+
: Returns a sequence of function items pointing to each public function in the
|
|
28
|
+
: module. If no $location is provided, then the current (calling) module is
|
|
29
|
+
: inspected.
|
|
30
|
+
: @return Sequence of function items containing all public functions in the module, or the empty sequence if the module is not known in the current context.
|
|
31
|
+
:)
|
|
32
|
+
declare function inspect:module-functions() as function(*)* external;
|
|
33
|
+
|
|
34
|
+
(:~
|
|
35
|
+
: Returns a sequence of function items pointing to each public function in the
|
|
36
|
+
: module. If no $location is provided, then the current (calling) module is
|
|
37
|
+
: inspected.
|
|
38
|
+
: @param $location The location URI of the module to be inspected.
|
|
39
|
+
: @return Sequence of function items containing all public functions in the module, or the empty sequence if the module is not known in the current context.
|
|
40
|
+
:)
|
|
41
|
+
declare function inspect:module-functions($location as xs:anyURI) as function(*)* external;
|
|
42
|
+
|
|
43
|
+
(:~
|
|
44
|
+
: Returns a sequence of function items pointing to each public function in the
|
|
45
|
+
: specified module.
|
|
46
|
+
: @param $uri The URI of the module to be loaded.
|
|
47
|
+
: @return Sequence of function items containing all public functions in the module, or the empty sequence if the module is not known in the current context.
|
|
48
|
+
:)
|
|
49
|
+
declare function inspect:module-functions-by-uri($uri as xs:anyURI) as function(*)* external;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module namespace kwic = "http://exist-db.org/xquery/kwic";
|
|
2
|
+
|
|
3
|
+
(:~
|
|
4
|
+
: Returns a KWIC (Key Word In Context) summary for the given match node.
|
|
5
|
+
: The result is an element with <exist:match> children wrapping the match terms.
|
|
6
|
+
: @param $node The node containing a Lucene full-text match
|
|
7
|
+
: @param $config A <kwic:config> element controlling width and truncation
|
|
8
|
+
:)
|
|
9
|
+
declare function kwic:summarize($node as node(), $config as element()) as element()? external;
|
|
10
|
+
|
|
11
|
+
(:~
|
|
12
|
+
: Returns a KWIC summary calling a callback function for each match.
|
|
13
|
+
: @param $node The node containing a Lucene full-text match
|
|
14
|
+
: @param $config A <kwic:config> element
|
|
15
|
+
: @param $callback A function called for each match with (match, mode) arguments
|
|
16
|
+
:)
|
|
17
|
+
declare function kwic:summarize($node as node(), $config as element(), $callback as function(*)) as element()? external;
|
|
18
|
+
|
|
19
|
+
(:~
|
|
20
|
+
: Gets the text before a Lucene match term.
|
|
21
|
+
: @param $node The match node
|
|
22
|
+
: @param $chars Maximum number of characters of context before the match
|
|
23
|
+
:)
|
|
24
|
+
declare function kwic:get-text($node as node(), $chars as xs:integer) as xs:string? external;
|