Liquid Studio Documentation
XSLT Editor/Debugger / XSLT Debugger Options
In This Topic
    XSLT Debugger Options
    In This Topic

    The debugger options shown are dependant upon the XSLT engine selected.

    The 2 XSLT engines currently supported are

     

    Saxon HE XSLT Engine options

    Input

    Main Module Filename - The XSLT file that will be executed or debugged (read only). Other XSLT files can be included using the <xsl:import href="common.xslt"/> directive.

    Context Item - The initial context for the XSLT Transform, this must be an XML file. Transforms do not have to have an initial context object, but they normally do.

    Output

    Filename - The filename that the default output if written to (you can us <xsl:result-document> to write to other files within the same transform).

    Format - The format of the output file. This affects the validation rules and formatting of the output. For more information see the W3C XSLT Standard.

    Input Values

    Sets parameters within the XSLT transform. The value of the parameter can be a string or XML loaded from a file.
    The parameter values can be picked up in the transform using the <xsl:param name="CssTheme" select="None"/> directive.

    Parameter Name - The name of the parameter (must match the name attribute in the param directive).

    Data Type - The type of data either text or XML data read from a file.

    Value - The value either the text literal or the filename, depending on the value of data type

    XSLT Debugger Options

    Data Type Declaration
    Binary Data xs:hexBinary('0123456789ABCDEF')
    Boolean xs:boolean(true)
    xs:boolean(false)
    Number xs:integer(123)
    String 'MyString'
    Date xs:date('YYYY-MM-DD')  (ISO 8601 format)
    DateTime xs:dateTime('YYYY-MM-DDThh:mm:ssZ')  (ISO 8601 format)
    Decimal xs:decimal(123.456)
    Double xs:double(1.23e4)
    Float xs:float(1.23e4)
    Time xs:time('hh:mm:ssZ')  (ISO 8601 format)
    Duration xs:duration('P2Y6M5DT12H35M30S')  (ISO 8601 format)

     

    Properties

    Base Uri - This is used for resolving any relative URIs appearing within the stylesheet, for example in xsl:include and xsl:import declarations, in schema locations defined to xsl:import-schema, or as an argument to the document() or doc() function

    Whitespace Rule - Ignorable stops ignorable whitespace to be output. All causes all whitespace to the stripped.

    DTD Validation Mode - Set whether or not DTD validation of this source documents is performed.

    Schema Validation Mode - Set whether or not XSD validation of this source documents is performed.

    Support XInclude - allows XInclude instructions in the source files to be processed.

    Enabled Optimizations - Turns on/off Saxon performance optimizations. For debugging it is recommended that this be turned off, as the execution path with it turned on can make debugging difficult to understand.

    Show whitespace in watch windows - default unchecked, shows/hides whitespace nodes within the Watch and Variable windows. Whitespace nodes are typically not processed within an stylesheet, and thus just clutter up the watch windows.

     Saxon Debugger Options - Custom Startup

     

    Startup Options

    It is possible to configure the saxon environment programmatically before the XSLT is executed or debugged. This allows custom functions and variables to be registered with the saxon environment, it also allows subtle tweaks to the environment to be performed.

    To programmatically configure the saxon environment you must create an assembly that implements the LiquidTechnologies.Debugger.SaxonPlugin.IExternalSaxonAdapter interface, the interface is defined within the assembly LiquidTechnologies.Debugger.SaxonPlugin.dll, so you must reference this dll in your class library.

    IExternalSaxonAdapter
    Copy Code
    public interface IExternalSaxonAdapter
    {
        void PreCompile(Processor saxonProccessor);
        void PreExecute(XsltTransformer saxonXsltEvaluator);
    }
    

    The PreCompile method is called before the transform is compiled, and allows functions to be registered into the environment.

    The PreExecute method is called before the transform is executed and allows parameters to be set into the environment.

    The class implementing the interface must be public and have a public default constructor (i.e. one which takes no parameters).

    See the Example in the folder Examples\Xslt Custom Functions

    Once you have built your class library you can use it by clicking the "Select Initialization Class", and select your assembly.

    The first class found supporting the IExternalSaxonAdapter interface will be selected.
    You should also be able to debug the code within your assembly by attaching a debugger to the Liquid XML Studio application when it's running.

     

    .Net XSLT 1.0 Engine

    The XSLT engine is the one shipped within .Net 4.0.

    The .Net XSLT engine does not support XSLT 2.0 and can not be debugged

     

    Input

    Main Module Filename - The XSLT file that will be executed or debugged (read only).

    Context Item - The initial context for the XSLT Transform, this must be an XML file. Transforms do not have to have an initial context object, but they normally do.

    Output

    Filename - The filename that the output if written to.

    Input Values

    Sets parameters within the XSLT transform. The value of the parameter can be a string or XML loaded from a file.
    The parameter values can be picked up in the transform using the <xsl:param name="CssTheme" select="None"/> directive.

    Parameter Name - The name of the parameter (must match the name attribute in the param directive).

    Data Type - The type of data either text or XML data read from a file.

    Value - The value either the text literal or the filename, depending on the value of data type

    See Also