RE: Standard error codes - QNames or not?

> -----Original Message-----
> From: public-xml-processing-model-wg-request@w3.org 
> [mailto:public-xml-processing-model-wg-request@w3.org] On 
> Behalf Of Norman Walsh
> Sent: Tuesday, June 10, 2008 11:48 PM
> To: public-xml-processing-model-wg@w3.org
> Subject: Re: Standard error codes - QNames or not?
> 
> 
> | Related to this, can p:error be used for generating standard XProc
> | errors (such as err:XS0001)?
> 
> I'm of two minds. I could see forbidding them on principle, on the
> other hand, I don't see a lot of danger allowing them.
> 

If we allow it, it would make it possible to "rethrow" the standard
errors in the catch block, for instance, which may be a useful feature:

<p:try>
  <p:group>
    ...
  </p:group>
  <p:catch>
    <p:choose>
      <p:when test="... check for err:XD0003 ...">
        <!-- rethrow err:XD0003 -->
        <p:error code="err:XD0003">
          ...
        </p:error>
      </p:when>
      <p:otherwise>
        <!-- do something else -->
      </p:otherwise>
    </p:choose>
  </p:catch>
</p:try>


Regards
Vojtech

Received on Thursday, 12 June 2008 07:04:18 UTC