- From: Julien Biezemans <jb@jbpros.com>
- Date: Sun, 25 Nov 2007 03:04:34 +0100
- To: public-xml-processing-model-comments@w3.org
Hi! I'm wondering if p:import dynamic errors (XD0009, XD0010 and XD0011) should not be static instead. The difference between static and dynamic errors seems to be time-related: static errors are thrown before pipeline evaluation while dynamic ones are raised during evaluation (it is said that try/catch only catches dynamic errors, which seems right to me). Am I right if I say that static errors are raised during parsing/validation while dynamic errors are used during actual pipeline (steps) execution? If I'm not, then all that follows is rubbish. If I am right: p:import allows steps and pipelines declarations (and also definitions, of course). Because p:import has a "declaring role", it may cause static errors related to the declaration contained in imported pipelines and libraries. Currently, if p:import execution is considered to be done during pipeline evaluation (thus being at the stage where only dynamic errors may be thrown) how can imported pipelines still raise static errors? An explanation could be that imported pipelines and libraries are considered to be parsed and validated at "container pipeline run time" and having their own lifecycle starting at this point. But then, how can the implementation validate steps in the main pipeline that make use of step types defined in imported documents? >From another point of view, p:import is not a step and could be seen like xinclude instructions (with additional constraints like scoping, etc). It seems to me that such "instructions" are to be executed before actual pipeline execution (again because validation requires that step types and pipelines are declared). p:import plays a major role in declaring the available steps and pipelines to the main pipeline, like pre-processor instructions in other programming languages. Those errors are static of nature. A third argument against dynamic errors for p:import is that p:import cannot be a descendant of p:try. What's the point of throwing a dynamic error that can never be caught? Following what I wrote above, this seems completely normal as p:import is a "static task" (at least in my mind) and is maybe another "natural" proof of what I'm trying to explain here. I know the definition for XProc dynamic errors cites "URI resolution failure" as one example of such errors and XD0009 clearly falls into that one. But still, I'm not convinced that all URI resolution failures should be considered dynamic errors. I really wonder if I'm completely mistaken about error types and p:import evaluation. And I already apologize if I'm polluting the list for nothing :-) But I'm working for several days on an XProc implementation and that point is not clear to me. Cheers, Julien.
Received on Sunday, 25 November 2007 19:29:00 UTC