You already know that Data Views are created using XSL and XSLT. What you might not know is that the data returned by a Data View can be formatted using another technology known as XML Path Language, or XPath. XPath is a standards-based language designed to allow a developer to easily refer to specific elements in an XML file. However, XPath also allows the developer to use expressions and functions to act upon XML elements. FrontPage uses XPath to format specific data in a Data View. As a user of FrontPage, you don't have to know anything at all about XPath. FrontPage will generate the necessary XPath code for you based on options you choose in the user interface. Suppose that you want to format the UnitPrice field as currency. You can do so as follows:
The UnitPrice field is now formatted as a currency value, and FrontPage is applying that formatting using XPath. The Format Item as menu item will contain different options based on what type of field you have selected. For example, if you have selected a field that consists of text, the options on the Format Item as menu are Text, Boolean, Hyperlink, and Picture. Using XPath, FrontPage makes it easy to format your Data View just the way you want it. |