org.w3c.mwi.mobileok.basic
Class AbstractXSLTTestImplementation

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.AbstractTestImplementation
      extended by org.w3c.mwi.mobileok.basic.AbstractXSLTTestImplementation
All Implemented Interfaces:
TestImplementation
Direct Known Subclasses:
AutoRefreshTest, CachingTest, CharacterEncodingSupportTest, ContentFormatSupportTest, DefaultInputModeTest, ExternalResourcesTest, GraphicsForSpacingTest, ImageMapsTest, ImagesSpecifySizeTest, LinkTargetFormatTest, MainDocumentTest, MinimizeTest, NoFramesTest, NonTextAlternativesTest, ObjectsOrScriptTest, PageSizeLimitTest, PageTitleTest, PopUpsTest, ProvideDefaultsTest, StyleSheetsUseTest, TablesAlternativesTest, TablesLayoutTest, TablesNestedTest

abstract class AbstractXSLTTestImplementation
extends AbstractTestImplementation

Abstract implementation of AbstractTestImplementation for tests that apply an XSL stylesheets to the DOM moki representation of the Web resource returned by PreprocessorResults.getMokiDocument().

The class searches for the XSL stylesheet in the "XSLT" subfolder. The name of the XSL stylesheet must match the name of the Java class of the final test. The XSL stylesheet is then applied to the moki representation of the Web resource under test.

The outcome of the XSL stylesheet must be a test fragment. See AbstractTestImplementation for an example.

For performance reasons, the XSL stylesheet must have been precompiled using Saxon (extension ".sxx").

All the XSLT-based mobileOK tests extend this class.

Version:
$Revision: 1.1 $
Author:
The W3C mobileOK Checker Task Force

Field Summary
private static javax.xml.transform.URIResolver CLASSPATH_URI_RESOLVER
           
private static net.sf.saxon.Configuration SAXON_CONFIG
           
 
Constructor Summary
AbstractXSLTTestImplementation()
           
 
Method Summary
private  javax.xml.transform.Transformer loadTransformer()
           
 TestResult runTest(PreprocessorResults results)
           
 
Methods inherited from class org.w3c.mwi.mobileok.basic.AbstractTestImplementation
convertToTestResult, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.mwi.mobileok.basic.TestImplementation
getTestType
 

Field Detail

SAXON_CONFIG

private static final net.sf.saxon.Configuration SAXON_CONFIG

CLASSPATH_URI_RESOLVER

private static final javax.xml.transform.URIResolver CLASSPATH_URI_RESOLVER
Constructor Detail

AbstractXSLTTestImplementation

AbstractXSLTTestImplementation()
Method Detail

runTest

public TestResult runTest(PreprocessorResults results)
                   throws TestException
Throws:
TestException

loadTransformer

private javax.xml.transform.Transformer loadTransformer()
                                                 throws TestException
Throws:
TestException