xsldbg help
xsldbg is similar to gdb. It has three modes of execution of stylesheets.
  • Run the whole stylesheet
  • Step to next xsl instruction
  • Continue to next break point is found
  • On systems with readline library available you can use the back/forward keys to navigate the history of entered commands. On all systems the last entered command can be repeated by just pressing the <ENTER> key.
  • TEMPLATENAME : a valid template name
  • FILENAME : a valid URL for a stylesheet
  • LINENO : a valid line number in associated FILENAME
  • NUMBER_OF_FRAMES : a valid line number frames to change position by
  • BREAKPOINT_ID : a valid break point number
  • SPEED: speed to walk through code at, between 0 to 9
  • (Comment): a comment about command meaning or usage
  • { opt1 | opt2 | opt2 .. etc} : Choose one of the opt's
  • XPATH : a xpath selection of node(s)
  • PARAM_ID : a valid parameter number as indicated by showparam command
  • PATH : a path to change working directory to
  • TEXT : free form text (no restricttions)
  • COMMAND : a valid command for the xsdbg
  • QNAME : a valid variable/parameter name
  • SOURCE : the stylesheet being/tobe executed
  • DATA : the xml data being/tobe processed by the stylesheet
  • Help related : help
  • Running related : {bye|exit| quit}, step, stepup, stepdown, continue, run, trace
  • Libxslt parameter related : addparam,delparam, showparam
  • Template related : templates, where, frame
  • Break point related : break, showbreak, delete, enable
  • Expression viewing(xpath) : cat
  • Node viewing : ls, dir, du, cat, pwd
  • Variable viewing : globals, locals, cat
  • Node selection : source, data, cd
  • Searching :search
  • Operating system related : chdir, shell
  • File related : validate, load, save, write, free
  • nb: At the moment the file related commands as disabled because they are not completed.
    Display help on command or overiew
  • help (Show overview of product)
  • help <COMMAND> (Show help about a command)
  • Exit processing stylesheet as soon as possible.
  • bye
  • Exit processing stylesheet as soon as possible. Shortcut name: q
  • quit
  • Exit processing stylesheet as soon as possible.
  • exit
  • Step until next stylesheet instruction. Shortcut name: s
  • step
  • Step up to a older "call frame". Shortcut name: up
  • stepup (step up one frame)
  • stepup <NUMBER_OF_FRAMES> (step up specified number of frames)
  • Step down to a newer "call frame". Shortcut name: down
  • stepdown (step down one frame)
  • stepdown <NUMBER_OF_FRAMES> (step down specified number of frames)
  • Continue running stylesheet, stopping at any break points found. Shortcut name: c
  • continue
  • Restart the stylesheet. Shortcut name: r
  • run
  • Trace one execution of the stylesheet
  • trace
  • Walk through code using a range of speeds
  • walk <SPEED> (Use Ctrl-c to stop execution, <SPEED> is a value between 0 and 9. Where 0 means stop, 1 is very fast, 9 is very slow)
  • Add a libxslt parameter
  • addparam <QNAME> <XPATH> (No error checking done on the validity of <QNAME> nor <XPATH>. This is equivalent to providing --param <QNAME> <XPATH> via command line)
  • Delete a libxslt parameter
  • delparam (Delete all parameters present)
  • delparam <PARAM_ID>
  • Print the libxslt parameters present
  • showparam
  • Print a list of available templates. Search for a template Shortcut name: t
  • templates
  • templates <TEMPLATE> (Print details of template named <TEMPLATE> if it can be found)
  • Print a trace of templates calls (frame stack) and print the working directory. Shortcut name: w
  • where
  • Print the stack frame at a given depth Shortcut name: f
  • frame <FRAME_DEPTH> (Depth is a number from 0 to the current depth of call stack)
  • Print out a list of stylesheets loaded Shortcut name: style
  • stylesheets
  • Break at a template, at a location in any file loaded, or at the current node. Shortcut name: b xsldbg will try to guess the complete URL given a
  • file name without a path specified.
  • a file name in the same directory as the "top" stylesheet loaded
  • a file name relative to the current working directory of xsldbg
  • Ie if you have loaded a stylsheet file of ../en/xsldoc.xsl you can do this
    break -l xsldoc.xsl 26
  • break -l <FILENAME> <LINENO>
  • break <TEMPLATENAME> (To break at named template.)
  • break * (To break at any template found.)
  • break (To break point at current node. Yes that includes xml data nodes!)
  • To display list of template break points. Shortcut name: show
  • showbreak
  • Delete a template breakpoint Shortcut name: d
  • delete (To delete breakpoint at current node)
  • delete <BREAKPOINT_ID> (To delete breakpoint at specified break point number)
  • delete -l <FILENAME> <LINENO> (Delete at specifed file, line number)
  • delete <TEMMPLATENAME> (To delete break point at named template.)
  • delete * (To delete all break points.)
  • Enable or disable a breakpoint (Toggle enable/disable/) Shortcut name: e
  • enable (To enable/disable breakpoint at current node)
  • enable <BREAKPOINT_ID> (To enable/disable breakpoint at specified break point number
  • enable -l <FILENAME> <LINENO> (Enable/disable breakpoint at specifed file, line number)
  • Disable a breakpoint
  • disable (To disable breakpoint at current node)
  • disable <BREAKPOINT_ID> (To disable breakpoint at specified break point number
  • disable -l <FILENAME> <LINENO> (Disable breakpoint at specifed file, line number)
  • List nodes in a brief format
  • ls
  • Print list of nodes in a similary way to the dir shell command.
  • dir
  • Print a summary of child nodes in a tree format.
  • du
  • Print the result of a xpath expression on relative current node. Usage : cat <XPATH> Usage : cat $<QNAME> (To view a varaible or parameter) Print the current working directory.
  • pwd
  • Print the base for this node
  • base
  • Dump the gory details of this node
  • dump
  • Print a list of global stylesheet variables or parameters. Print the value of a global variable
  • globals (Print list of all globaly available variables)
  • globals <QNAME> (Print the value of variable specified)
  • Print a list of local stylesheet variables or parameters. Print the value of a local variable
  • locals (Print list of all locally available variables)
  • locals <QNAME> (Print the value of variable specified)
  • Switch to displaying the current node in stylesheet. Or change stylesheet used
  • source (Switch to the current node in stylesheet.)
  • source <SOURCE> (To change to a new source file. A leading '~' is replaced by the $HOME environment variable value. May need to use run command to execute it)
  • Switch to displaying the current node in xml data. Or change xml data used
  • data (Switch to the current document node.)
  • data <DATA> (To change to a new xml data file. A leading '~' is replaced by the $HOME environment variable value. May need to use run command to process it)
  • Change to the path specified by a xpath.
  • cd <XPATH>
  • cd -t<TEMPLATENAME> (To changes current SOURCE node to a be xsl template with name <NAME>, but does execute source command)
  • cd -s<XPATH> (An absolute xPath to node within stylesheet)
  • cd <SHORTCUT> <XPATH>
  • Where SHORTCUT can be either
  • << = preceding-sibling::node()
  • >> = following-sibling::node()
  • <- = ancestor::node()
  • -> = decendant::node()
  • Validate the output file generated by stylesheet (Disabled) Reload stylesheet and data file(s) (Disabled see run) Save the generated data file (Disabled) To be completed Free stylesheet and data (Disabled see run) Search a database of all information gathered from styleets loaded When the search command is issued a file (search.data) will be created in the current directory. You can then process this file with your own stylessheet to present data in a other ways than displayed by default. Depending on the amount of data collected it might take a while to compled this command. At the moment breakpoints are not being sorted properly. Which is being looked at.
  • search <XPATH>(See what xpath can be used see search.dtd)
  • search -sort <XPATH>(Enable tell search.xsl to sort the result before outputing it)
  • Change the working directory
  • chdir <PATH> (A relative or absolute path for operating system)
  • Execute shell command
  • shell <TEXT> (<TEXT> is the text to be passed to operating system for execution)