Using parameters with XSL transformations

Using parameters with XSL transformations

You can define parameters for your XSL transformation when adding the XSL Transformation server behavior to a web page. A parameter controls how XML data is processed and displayed. For example, you might use a parameter to identify and list a specific article from a news feed. When the page loads in a browser, only the article you specified with the parameter appears.

To add an XSLT parameter to an XSL transformation:

  1. Open the XSL Transformation dialog box. You can do this by double-clicking an XSL Transformation server behavior in the Server Behaviors panel (Window > Server Behaviors), or by adding a new XSL Transformation server behavior. For instructions, see Inserting XSLT fragments in dynamic pages.
  2. In the XSL Transformation dialog box, click the Plus (+) button next to XSLT Parameters.

    This is a picture of the feature being described.

  3. In the Add Parameters dialog box, enter a name for the parameter in the Name text box. The name can only contain alphanumeric characters. It cannot contain spaces.
  4. Do one of the following:
    • If you want to use a static value, enter it in the Value text box.
    • If you want to use a dynamic value, click the dynamic icon next to the Value text box, complete the Dynamic Data dialog box, and click OK. For more information, click the Help button in the Dynamic Data dialog box.
  5. In the Default Value text box, enter the value you want the parameter to use if the page receives no run-time value.
  6. Click OK.

To edit an XSLT parameter:

  1. Open the XSL Transformation dialog box. You can do this by double-clicking an XSL Transformation server behavior in the Server Behaviors panel (Window > Server Behaviors), or by adding a new XSL Transformation server behavior. For instructions, see Inserting XSLT fragments in dynamic pages.
  2. Select a parameter from the XSLT parameters list.
  3. Click the Edit button.
  4. Make your changes and click OK.

To delete an XSLT parameter:

  1. Open the XSL Transformation dialog box. You can do this by double-clicking an XSL Transformation server behavior in the Server Behaviors panel (Window > Server Behaviors), or by adding a new XSL Transformation server behavior. For instructions, see Inserting XSLT fragments in dynamic pages.
  2. Select a parameter from the XSLT parameters list.
  3. Click the minus (-)button.

Related topics

  • Creating XSLT pages
  • Inserting XSLT fragments in dynamic pages
  • About using XML and XSL with web pages


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Defining Sources of Dynamic Content
Developing Applications Rapidly
 
ASPTreeView.com
 
Evaluation has ЦµЖexpired.
Info...