Creating XSL files

An XSL file is a style sheet that can be used to transform XML documents into other document types and to format the output. 

Since the XML language does not use predefined tags, it is necessary to provide a Web browser with information on how to interpret the XML document. The XSL document provides a browser with information on how to display an XML document.

The following instructions were written for the Resource perspective, but they will also work in many other perspectives.

  1. Create a project to contain the XSL file.
  2. In the workbench, click File > New > Other > XML > XSL and click Next If you cannot see the XML option, select the Show All Wizards check box.
  3. If you are prompted to enable XML Development capabilities, click OK.
  4. Select the project or folder that will contain the XSL file.
  5. In the File name field, type the name of the XSL file, for example MyXSLFile.xsl. The name of your XSL file must end with the extension .xsl.
  6. Click Next, or, if you do not want to associate an XML file with your XSL file, click Finish.
  7. You can select an XML file to associate with your XSL file. For more information about associating XSL files with XML files, refer to the related tasks.
  8. Click Finish
The XSL file appears in the Navigator view and automatically opens in the XSL editor. 
Related tasks
Associating XSL files with XML files
Selecting xsl:stylesheet or xsl:transform as your root element
Validating XSL files

Feedback