Re: formatting alert message with distinct-values()
After a good night sleep it is clear why the originally posted code did
not work. I have modified it as shown below and now every error is
mentioned only once.
Some background info - my form can have the same field displayed
multiple times and I had to do this to avoid displaying the alert
messages multiple times when the classic XForms engine determines that
such a repeated field is violating some model constrain.
On Oct 4, 2005, at 4:22 PM, Alexander Zatko wrote:
> In the "theme/formatting.xsl" file I want to avoid showing the same
> message repeatedly so I added distinct-values() function to the
> "f:alert" nodeset like this:
> <!-- - - - - - - Legacy XForms templates - - - - - - -->
> <xsl:template match="f:alerts">
> <table cellpadding="0" cellspacing="0" border="0"
> style="background: #FFCCCC; margin: 1em; padding: .5em">
> <td valign="top"><img
> <td valign="top" style="padding-left: 1em">
> Please correct the errors on this page.
> <xsl:if test="f:alert">
> <li><xsl:copy-of select="node()"/></li>
> ...but this seems to break the ops completely as all I receive is:
> HTTP Status 500 -
> type Status report
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
> Apache Tomcat/5.0.28