Apply multiple conditional xslt regions – Adobe Dreamweaver CC 2015 User Manual
Page 528
521
XML
Last updated 6/3/2015
Note: You must surround string values such as true in quotes. Dreamweaver encodes the quotes for you (') so that
they are entered as valid XHTML.
In addition to testing nodes for values, you can use any of the supported XSLT functions in any conditional
statement. The condition is tested for the current node within your XML file. In the following example, you want to
test for the last node in the result set:
For more information and examples on writing conditional expressions, see the
panel (Help > Reference).
Apply multiple conditional XSLT regions
You can write a simple conditional expression to insert into your XSLT page. If content is selected when you open the
Conditional Region dialog box, the content is wrapped in an
then customize the expression in Code view.
The
test a condition and take a course of action based on the result. The
conditions.
1
Select Insert > XSLT Objects > Multiple Conditional Region or click the Multiple Conditional Region icon in the
XLST category of the Insert panel.
2
In the Multiple Conditional Region dialog box, enter the first condition.
In the following example, you want to test to see if the context node’s price subelement is less than 5.
3
Click OK.
In the example, the following code is inserted in your XSLT page:
Content goes here
Content goes here