on 05-24-2023 9:17 AM
Hi all,
in an A4 print template I want to cancel the printing if a certain condition applies. I found xsl:message with the parameter terminate:yes, but using that one this error is written:
javax.xml.transform.TransformerException: java.lang.RuntimeException: Nicht unterst├╝tztes XSL-Element "http://www.w3.org/1999/XSL/Transform:else" (not supported xsl-Element).
Is there another way to cancel the printing / print processing? I am aware that an error in CCO might be shown, that is not a problem.
Thanks
Kai
Hello k.schittko
Your error message suggests you were using an "xsl:else" element. However, that element does not exist.
You may alternatively try the following (inverted if condition)
<xsl:if test="condition">
<xsl:message terminate="yes">Print cancelled due to condition</xsl:message>
</xsl:if>
<xsl:if test="not(condition)">
<!-- the rest of your document -->
</xsl:if>
Or this (choose... otherwise):
<xsl:choose>
<xsl:when test="condition">
<xsl:message terminate="yes">Print cancelled due to condition</xsl:message>
</xsl:when>
<xsl:otherwise>
<!-- the rest of your document -->
</xsl:otherwise>
</xsl:choose>
Hope this helps!
Best regards,
Joerg.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.