Hi Christian --

A definitive no means I can stop looking; thank you!

I think I will probably just put the warnings in the report being generated in what is maybe the more XML-appropriate way.

Much appreciated,
Graydon

On Fri, Mar 4, 2022 at 4:57 AM Christian Grün <christian.gruen@gmail.com> wrote:
Hi Graydon,

In XQuery, there is no such thing as a warning function. If we
included such a function in BaseX, we’d probably need to define rules
for each API (GUI, clients, RESTXQ, others) how to return such
warnings.

If you use BaseX on command-line, however, all output of fn:trace,
prof:dump, etc. will be sent to STDERR, so maybe that’s already what
you are looking for.

Cheers,
Christian



On Thu, Mar 3, 2022 at 5:42 PM Graydon Saunders <graydonish@gmail.com> wrote:
>
> Hello all --
>
> XPath has an error function, https://www.w3.org/TR/xpath-functions-31/#func-error which stops processing, which isn't wanted when it's just a warning.  ("this thing has problems; on to the next thing" shouldn't stop processing.)
>
> XPath has a trace function, https://www.w3.org/TR/xpath-functions-31/#func-trace which emits text, but which I think is like xsl:message and will write to STDOUT rather than STDERR.
>
> This leaves me thinking I've missed something -- how should I have a query give a warning?  I'm not finding something BaseX specific; I'm fairly sure neither error() nor trace() are correct.
>
> Any suggestions?
>
> Thanks!
> Graydon
>