Sablotron Guide and Reference

Debugging XSLT .General

Summary

Sablotron can be used as XSLT debugger.

Syntax

These commands can be used from the debugger command line:

Processed data:
   data filename        - sets the data file
   param name value     - sets the external parameter
   P                    - lists all params
   PP                   - clears all params
   sheet filename       - sets the stylesheet
Breakpoints:
   break filename:line  - sets the breakpoint
   bstat                - shows breakpoint stats (total/enabled/break)
   B                    - lists all breakpoints
   condition num cond   - for the breakpoint NUM sets the condition COND
   del num              - deletes the breakpoint NUM
   disable num          - toggles the breakpoint number NUM
   D                    - deletes all breakpoints
   ignore num count     - ignores the breakpoint NUM for COUNT times
Execution control:
   continue             - continues the execution
   finish               - finishes the current node parent
   kill                 - stops the processing immediately
   next                 - goes to the next sibling
   run                  - runs the processor
   step                 - continues until the next element
   templ                - continues until the next template executed
Evaluation:
   eval                 - evaluates the XPath expression
   x [list | num]       - examines the current context
Miscellaneous:
   batch filename       - loads the command set for file
   help                 - prints this help
   output               - toggles output on/off
   point                - shows where you are
   quit                 - quites the debugger

Description

Run 'sabcmd --debugger' to invoke the debugger. Then, you can trace execution of your templates. The only point, where the debugger can stop the execution is the element start.

Notes

Abbreviations
You need to type as few letters to specify the command as is needed to recognize, what you mean. The most frequent command may be run with single letter not caring, whether another command starts with this letter. The `s' abbrev runs the `step' command rather the `sheet'.

Emacs Integration
There is an Emacs library available. You may use it to debug your stylesheets in Emacs directly. You need to grab the sabdbg.el from the Sablotron source tree and to add a couple of lines into your .emacs file. Look at doc/misc/DEBUGGER file in Sablotron distribution for more details.

See Also

Groups [ .General ]

© 2002-2003 Ginger Alliance
revision 03-06-30
This page was generated by APIDOC