Skip to main content

Notice: This Wiki is now read only and edits are no longer 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: Namespace Content Assistance Testing

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.

Scenario 4: Content Assistance for XPath Functionality

  1. Create a new XSL File by using the New XSL File Wizaard.
    1. Give the XSL File a name like Scenario4.xsl
    2. Select a normal XSL Stylesheet.
  2. Using the XSL Editor, create the styelsheet in Listing 17-10.
    1. Test content assistance for the XSL Elements.
    2. Test content assistance for the XHTML elements.
    3. Test content assistance for the select attribute of the xsl:value-of attribute.
      1. Test with no prefilled proposals.
      2. Test with part of par typed
      3. Test content assistance after parent::
  3. Save the File.
  4. Verify that Validation is working as expected.
    1. Make a change that invalidates the XSL file.
    2. Verify that Validation on XPath statements is working. Make the XPath invalid. i.e. change parent:: to tarent::.
  5. Verify that Validation Preferences can be changed.
  6. Set up a Launching Scenario, and verify that launching works (see Scenario 2).

Scenario 5: Debugging

Need Debugging Scenario

Scenario 6: XPath View

Need XPath View testing

See Also

Click here to view WTP smoke test results.

Back to the top