Re: Error definition

On Sun, 2022-02-06 at 07:51 +0000, Dave Pawson wrote:
> On Sat, 5 Feb 2022 at 17:26, C. M. Sperberg-McQueen
> <cmsmcq@blackmesatech.com> wrote:
> > > A user view.
> > > 1.input.ixml
> > > 2.input.txt
> > > (hoped for)
> > > 3. output.xml
> > > 
> IMHO a bug in the processor does not give me 3, hence it is an error.

Well, i agree that an error condition might result in no output; so
might other conditions, such as a --test-grammar-only option.

If i'm a programmer using an API, a library, to test a grammar, i need
the processor to signal to my program that there's a problem (this is
not an invisible xml grammar). If i'm writing a text editor i certainly
dont' want the editor to quit immediately without saving, if you make a
mistake!  If after attempting to process the ixml input there's stuff
left over, whether in the ixml grammar the user supplied to me or in
their input files, that's probably a runtime error condition my program
needs to alert the user to.

A lot of programs expecting a number will accept "3inches" or "12 cm"
because that's what the C atoi() did; when i wrote C programs years ago
i used a different function (that i wrote) so i could report if there
was trailing non-inter stuff, as atoi() also "succeeds" on 3.999,
returning 3.

So an ixml processor needs to be able to signal to the caller - whether
that's a human or a program - that there was a problem of some sort in
processing all the input and producing output, but the way in which it
should do this depends on the circumstance.

I don't think the word "Error" is helping a move towards clarity here.


-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org

Received on Sunday, 6 February 2022 22:24:46 UTC