You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Simon Kitching <si...@ecnetwork.co.nz> on 2002/09/13 05:09:46 UTC

terminating stylesheet processing from an extension element

Hi all,

I recently had some problems with custom extension elements being unable
to terminate stylesheet processing if an error occurred.

I have found an adequate workaround, but wanted to get this issue into
the email lists, and to draw some attention to it.

If code in an extension element (ie some custom code that can be invoked
with a syntax line <mynamespace:mytag foo="123" bar="456"/>) encounters
an error, it can report this by:
(a) throwing a TransformerException, or
(b) calling the transformer.getErrorListener.error("..") [or variants
thereof].

Due to a strange quirk in the code, if the exception's error message
contains the string "fatal", then this will cause the stylesheet
processing to terminate. If the magic string is not present, then
stylesheet processing continues.

The "workaround" for this problem is just to ensure that "fatal" is
present in the exception message [no matter what language the rest of
the message is....]

This was originally reported 2002-03-22, and is present in the current
release (2.4.0).

More info can be found in bugzilla at:
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7357


Thanks,

Simon