W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > October 2007

Re: Dynamic errors, choose

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 08 Oct 2007 17:17:16 +0100
Message-ID: <470A580C.3030802@jenitennison.com>
To: Richard Tobin <richard@inf.ed.ac.uk>
CC: public-xml-processing-model-comments@w3.org

Richard Tobin wrote:
> End of section 3:
> 
>   "If an XProc processor can determine statically that a dynamic error
>    will always occur, it may report that error statically."
> 
> Does this mean it may refuse to run the pipeline, or merely that it
> may report the error?  What if the error would have been caught by
> a try/catch?

I think that it MAY report the error and therefore MAY refuse to run the 
pipeline (that's what you usually do when you hit a static error).

If the error would have been caught by a try/catch then the XProc 
processor is non-conformant. It's only allowed to report the error 
statically if it can determine statically that a dynamic error will 
always occur: if it would have been caught by a try/catch then it 
wouldn't always occur, so it's not the kind of dynamic error that an 
implementation can report statically.

> The example that brought this up:
> 
> As far as I can see, a p:choose with no when or otherwise is always a
> dynamic error, since no branch will be chosen.  It seems reasonable to
> report this statically and reject the pipeline.

Err, yes. I think the syntax of <p:choose> should reflect this (in other 
words, that <p:choose> *must* have at least one <p:when>, and I think it 
should probably always have a <p:otherwise> as well).

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com
Received on Monday, 8 October 2007 16:17:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:42 GMT