Operation Manual

489
USING DREAMWEAVER
Displaying XML data with XSLT
Last updated 3/28/2012
You can also click on the XSL Comment icon in the XSLT category of the Insert panel.
Wrap a selection in XSL comment tags
1 Switch to Code view (View > Code).
2 Select the code you want to comment.
3 In the Coding toolbar, click the Apply Comment button and select Apply <xsl:comment></xsl:comment>
Comment.
Use the XPath Expression Builder to add expressions for XML data
XPath (XML Path Language) is a non-XML syntax for addressing portions of an XML document. It is used mostly as
a query language for XML data, just as the SQL language is used to query databases. For more information on XPath,
see the XPath language specification on the W3C website at
www.w3.org/TR/xpath.
The XPath Expression Builder is a Dreamweaver feature that lets you build simple XPath expressions for identifying
specific nodes of data and for repeating regions. The advantage of using this method instead of dragging values from
the XML schema tree is that you can format the value that is displayed. The current context is identified based on the
position of the insertion point in the XSL file when the XPath Expression Builder dialog box is opened. The current
context is in boldface type in the XML schema tree. As you make selections within this dialog box, the correct XPath
statements, relative to your current context, are generated. This simplifies the process of writing correct XPath
expressions for beginners and advanced users.
Note: This feature is designed to help you build simple XPath expressions to identify a specific node or for repeating
regions. It does not allow you to edit the expressions by hand. If you need to create complex expressions, use the XPath
Expression Builder to get started and then customize your expressions in Code view or with the Property inspector.
Create an XPath expression to identify a specific node
1 Double-click the XML data placeholder on the page to open the XPath Expression Builder.
2 In the XPath Expression Builder (Dynamic Text) dialog box, select any node in the XML schema tree.
The correct XPath expression is written in the Expression box to identify the node.
Note: If you select a different node in the XML schema tree, the expression changes to reflect your choice.