STX should provide a general and consistent way to
handle errors with STX means.
That means instead of introducing special
attributes/instructions/whatever for each STX
instruction (for example the case an URI for
stx:process-document couldn't be retrieved), the
general error handling mechanism would cover these.
According to Petr's proposal the STX processor should
generate a special SAX event using a special namespace
that can be processed in a template just like any other
SAX event.
This event could be regarded as an exception. Catching
an exception then is:
<stx:template match="stxex:file-not-found">
...
</stx:template>
<stx:template match="stxex:*"> <!-- catch all -->
...
</stx:template>
Each exception is an empty element. Properties of the
exception will be represented as attributes.
The stylesheet must provide a way to change the
namespace used for exceptions (in case the input itself
uses elements in this namespace).
Logged In: YES
user_id=76736
See the thread
http://archive.gingerall.cz/archives/public/stx2003/msg00079.html
Logged In: YES
user_id=149440
Other relevant thread:
http://archive.gingerall.cz/archives/public/stx2003/msg00446.html
(original idea vs. stx:try/stx:catch)