Hi Greg,

A helpful observation. With XQuery 4, parameters can directly be addressed
by their name, and optional arguments can be omitted:

  validate:xsd($doc, options := $options)


The changes that were required to make this work led to a bug that is now
fixed in the latest snapshot [1].

Thanks,
Christian

[1] https://files.basex.org/releases/latest/



On Mon, Mar 11, 2024 at 2:42 PM Murray, Gregory <gregory.mur...@ptsem.edu>
wrote:

> Hello,
>
>
>
> What is the default value of the “cache” option for the validate:xsd()
> function? The default doesn’t seem to be indicated in the documentation for
> that function.
>
>
>
> Also, the following code raises an error message saying “Item expected,
> empty sequence found” but that seems odd since the second argument to
> validate:xsd() is supposed to be optional, thereby telling the validation
> process to fall back to using the schema indicated in the document itself.
>
>
>
> let $options := map {'cache' : true()}
>
> for $doc in collection()
>
> return validate:xsd($doc, (), $options)
>
>
>
> Is this a bug or have I misunderstood something?
>
>
>
> Thanks,
>
> Greg
>
>
>
>
>
> Gregory Murray
>
> Director of Digital Initiatives
>
> Wright Library
>
> Princeton Theological Seminary
>
>
>
>
>

Reply via email to