SharePoint Designer 2007 and Expression Web
In SharePoint Designer 2007 and in Expression Web, you can apply conditional XSLT formatting
for information in a Data view that is being returned from an XML data source.
For example, a Data view may include data that is contained in a static XML
file or that comes from a Microsoft Windows SharePoint Services list.
To modify the XSLT
to make every other row in the Data view a different color, follow these steps:
- Click in any table cell that contains XML data.
- On the Table menu, point to
Select, and then click Row.
- Click the Task Panes menu, and then click
Conditional Formatting.
- In the Conditional Formatting task pane,
click Apply Formatting on the Create
menu.
- In the Condition Criteria dialog box,
click Click here to add a new clause.
- In the Field
Name column, click [Row Number].
- In the Condition column, click IsOdd.
- Click
OK.
- In the Modify Style dialog box, click
Background.
- In the Background area, click
the Gray color swatch in the Background-color menu.
- Click OK two times to return to the design
surface in FrontPage.
Every other row is now gray.
FrontPage 2003
In FrontPage 2003, you can apply conditional XSLT formatting
for information in a Data view that is being returned from an XML data source.
For example, a Data view may include data that is contained in a static XML
file or that comes from a Windows SharePoint Services list.
To modify the XSLT
to make every other row in the Data view a different color, follow these steps:
- Click in any table cell that contains XML data.
- On the Table menu, click
Select, and then click Row.
- Click the Data menu, and then click
Conditional Formatting.
- In the Conditional Formatting task pane,
click Apply Formatting in the Create
section.
- In the Condition Criteria dialog box,
click [Row Number] in the Field
Name area .
- Click IsOdd, and then click
OK.
- In the Modify Style dialog box, click
Format, and then click Border.
- In the Borders and Shading dialog box,
click Shading.
- In the Shading dialog box, click
Gray.
- Click OK two times to return to the design
surface in FrontPage.
Every other row is now gray.