xsl-list
[Top] [All Lists]

Writing an optional element

2004-07-05 12:38:17
Hi
 
I have an XSL template that has to write an element depending on a
condition.
 
If Condition is true
 
<element>
... continue processing ...
</element>
 
If Condition is false
 
... continue processing ...
 
Is there a better way to do it than:
 
<xsl:choose>
  <xsl:when test="condition">
    <element>
      ... processing instructions ...
    </element>
  </xsl:when>
  <xsl:otherwise>
      ... repeat processing instructions ...
  </xsl:otherwise>
</xsl:choose>
 
Thanks in advance




<Prev in Thread] Current Thread [Next in Thread>