SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1682 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

In fact, the code uses a
the tag. For example, if you wanted to display text indicating the final item from an RSS feed,
you??™d use code like this:

Last item:



The test attribute checks to see if the position() function??”which refers to the current item??”is the
same as the one the last() function returns and, if so, displays the text. To apply the XSLT Conditional
Region object, follow these steps:
997
Integrating with XML and XSLT 32
1. Select the text, image, page object, or code you want to make conditional in either Design or
Code view.
2. From the Insert bar??™s XSLT category, choose Conditional Region.
3. When the Conditional Region dialog box opens, enter the condition to evaluate in the Test field
(see Figure 32-9).
FIGURE 32-9
Display or hide anything in an XSL fragment through the XSLT Conditional Region object.
4. Click OK.
While the XSLT Conditional Region object displays or doesn??™t display some code based on a single condition,
the Multiple Conditional Region is much more flexible. Although the Multiple Conditional Region
object initially tests a single condition, it provides alternative output leading to an either/or code output.
For example, say again you wanted to test for the final item and note it as such when it appears, but you
also wanted to display other text, that is, Next item:, until it appears.


Pages:
1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694