Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

XSLT Tools/SmokeScenarios

These tests are based on chapter 17 of the XML Bible: XSLT. This chapter is also a good introduction for those that aren't familiar with XSLT and need a primer on getting started.

Prereqs

  • Create a Project to hold the XML and XSL files. This project will also hold the output for the transformations.
  • Create an XML file that contains the periodic table from Listing 17-1.

XSL Tools Smoke Test Scenarios

The following scenarios will test the basic functionality of the editor. These scenarios are broken into several sections that will test options of the XSL Tools editor and plugins from end to end.

Scenario 1: Simple XSL Stylesheet Editing Test

  1. Create a new XSL File by using the New XSL File Wizaard.
    1. Give the XSL File a name like Scenario1.xsl
    2. Select a normal XSL Stylesheet.
  2. Using the XSL Editor, create the styelsheet in Listing 17-2.
    1. Test Content Assistance for XSLT elements.
      1. Note that currently that within non-xsl elements there isn't content assistance for the elements until an XSL element is added.
  3. Save the File.
  4. Verify that Validation is working as expected.
    1. Make a change that invalidates the XSL file.
  5. Verify that Validation Preferences can be changed.

Scenario 2: Simple Transformation

This test uses the file that was created in Scenario 1.

  1. Create a new XSL Launch Configuration.
  2. Input file is the Atomic Table XML file from Listing 17-1.
  3. The XSL files is the file that was created in Scenario 1.
  4. Leave output filename as default, this should create a file that is the Input file with out.xml as the extension.
  5. Select the Processor to use.
    1. Test should be run with the Default JRE processor
    2. Test should be run with the Xalan 2.7.1 processor
  6. View the output of the file created.

Scenario 3: Simple XSL Stylesheet Editing Test

This scenario tests that the non-XSL content assistance for Namespaced Grammar assistance is working. This functionality is inherited from the XML editor.

  1. Create a new XSL File by using the New XSL File Wizaard.
    1. Give the XSL File a name like Scenario1.xsl
    2. Select a normal XSL Stylesheet.
  2. Create an XML Catalog entry for the XHTML namespace. The XSD to use for the catalog entry is http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd
  3. Using the XSL Editor, create the styelsheet in Listing 17-2.
    1. set the default namespace to xmlns="http://www.w3.org/1999/xhtml" on the xsl:stylesheet element.
    2. Test content assistance for the XSL Elements.
    3. Test content assistance for the XHTML elements.
      1. Note that currently that within non-xsl elements there isn't content assistance for the elements until an XSL element is added.
  4. Save the File.
  5. Verify that Validation is working as expected.
    1. Make a change that invalidates the XSL file.
  6. Verify that Validation Preferences can be changed.


See Also

Click here to view WTP smoke test results.

Back to the top