Add assert element


In order to prevent fatal errors from passing by unnoticed it would be 
interesting to
have an "assert" element with a "test" attribute, just like with the "if" and 
elements. The contents of the element could be anything that generates a 
Whenever the evaluation of the test would fail, processing would stop after 
the error message. For example:

<xsl:template name="foo">
  <xsl:param name="par"/>
  <xsl:assert test="number($par) > 0">
    <xsl:text>Parameter par of template foo has value </xsl:text>
    <xsl:value-of select="$par"/>
    <xsl:text>, while it must be a strictly positive number.</xsl:text>



Werner Donné  --  Re BVBA
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803   e-mail:

Received on Tuesday, 11 June 2002 08:17:54 UTC