Format Data Conditionally

The last action we will perform on the table is to write an XPath expression to display the `R' rating for movies in a bold red.

24. Click the rating glyph.
25. In the Properties window, expand the Default Color property.
26. Click the XPath field, and then click the "more" button ( ).

Stylus Studio displays the XPath Editor dialog box.

27. Type the following XPath expression:

      if (rating = 'R') then 'red' else ""
       

    

Notice Stylus Studio's Sense:X auto-completion and text coloring as you type.

Figure 496. XPath Editor Dialog Box

28. Click OK.
29. Next, use the same process to enter this XPath expression for the Bold property:

      if (rating = 'R') then 'bold' else ""
       

    
30. Click Preview ( ).

Our report now looks like this:

Figure 497. Finished Example Report

Create XML Schema from XML Content

Create XML Schema from XML Content by auto-generating an XML Schema with Stylus Studio.

Validate XML Using XSD

You can validate XML documents against any data model defined using W3C XSD, using any major XSD Validator, including MSXML 3.0, MSXML 4.0, MSXML 6.0, Xerces-J, Xerces-C, Microsoft System.XML (1.0 and 2.0), XSV, the Saxonica XSD Validator and others.

XML File Explorer

The XML File Explorer provides a productive, consistent, and easy-to-use interface for working with any data sources (relational data, EDI, binary, XML, CSV, and more) used in enterprise data integration projects.

Key Benefits of DataDirect XML Converters

Learn how DataDirect XML Converters were created to maximize XML developer productivity, push innovation, and provide unquestioned value.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.