I have a loop with the same tags to load content in ten cells but has a difference div title and background image, so I wonder is there any way to use the switch case just to put correct div title when I do for-each to load content for each cells in XSL? something like this: <...load the same tags content here...> Please help me because I'm new in XSL, and thank you in anyway!!
The <xsl:if> Element To put a conditional if test against the content of the XML file, add an <xsl:if> element to the XSL document.
XSLT if-else elements contain a sequence of conditions with the expression values that work when a condition is true with the <xsl: when> statement. this <xsl:when> specifies unlimited instructions. XSL specifications implies a function<xsl: choose> to implement the functionality of if-else statements.
yes, they are mutually exclusive - refer to stackoverflow.com/questions/18742988/…
xslt. The values of the tableName XML element is case insensitive.
You may use the if condition
<xsl:if test="expression"> ...some output if the expression is true... </xsl:if>
or choose, if there's more than one condition to check
<xsl:choose> <xsl:when test="expression"> ... some output ... </xsl:when> <xsl:when test="another expression"> ... some output ... </xsl:when> <xsl:otherwise> ... some output .... </xsl:otherwise> </xsl:choose>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With