Table of Contents                   SourceForge Logo

 

Introduction to xsldbg related tools

xsldbg

Requirements

See https://sourceforge.net/projects/xsldbg/files/xsldbg/

Latest release

The lastest release downloads

Note:Prebuilt Win32 binaries are provided for xsldbg and qxsldbg products.



Author

The primary author is Keith Isdale

The author for the riscos specific code is Justin Fletcher

The author some of the WIN32 code is Igor Zlatkovic


Licence

This tool is available under the GPL licence

Documentation

See xsldbg usage and commands

Screen shots

Related web sites


Email lists

http://lists.sourceforge.net/lists/listinfo/xsldbg-announce


Installation

For installation instructions see the README.md in the downloaded source package.

Testing / running example

Example xsldbg session

To test / try out xsldbg

cd xsldbg/docs/en

xsldbg --shell xsldoc.xsl xsldoc.xml


And you should get the xsldbg prompt like


XSLDBG <VERSION>

Starting stylesheet

Breakpoint at file xsldoc.xsl : line 18

xsldbg) xsl:param >


You can now start entering commands at the "(xsldbg) .* >" prompt. In the example text in

green has been typed by the user.


To print help just type "help";

To exit xsldbg just type "exit"


Breakpoint at file xsldoc.xsl : line 18

(xsldbg) xsl:param > templates

template :"/" in file xsldoc.xsl : line 23

template :"helpOnCommand" in file xsldoc.xsl : line 49

template :"header" in file xsldoc.xsl : line 67

template :"text()" in file xsldoc.xsl : line 79

template :"para" in file xsldoc.xsl : line 83

template :"list | usage" in file xsldoc.xsl : line 89

template :"comment" in file xsldoc.xsl : line 99

template :"cmd-summary" in file xsldoc.xsl : line 103

template :"cmd" in file xsldoc.xsl : line 109

Total of 9 templates found

Total of 9 templates printed

(xsldbg) xsl:param > break /

Size of line list was 0 adding 24 entries

(xsldbg) xsl:param > break header

Size of line list was 24 adding 44 entries

(xsldbg) xsl:param > showbreak

Breakpoint 1 enabled for template :"/" in file xsldoc.xsl : line 23

Breakpoint 2 enabled for template :"header" in file xsldoc.xsl : line 67

Total of 2 breakPoints present

(xsldbg) xsl:param > break -l xsldoc.xsl 44

(xsldbg) xsl:param > showbreak

Breakpoint 1 enabled for template :"/" in file xsldoc.xsl : line 23

Breakpoint 3 enabled in file xsldoc.xsl : line 44

Breakpoint 2 enabled for template :"header" in file xsldoc.xsl : line 67

Total of 3 breakPoints present

(xsldbg) xsl:param > continue

Reached template :"/"

Breakpoint 1 Breakpoint in file xsldoc.xsl : line 23

(xsldbg) xsl:template > continue

Reached template :"/"

Breakpoint 1 Breakpoint in file xsldoc.xsl : line 23

(xsldbg) text > continue

Reached template :"header"

Breakpoint 2 Breakpoint in file xsldoc.xsl : line 67

(xsldbg) xsl:template > exit

Example XEmacs session using xsldbg-mode

Open an XML file into a buffer, then press <META>-x followed by entering "xsldbg-buffer" into the dialog xemacs provides. At the first prompt enter the file name of stylesheet to use. At the prompt for "Parameters" enter any extra parameters that you would normally provide to xsldbg via the command line.

After xsldbg-mode initializes you will have cursor highlighting the first line that xsldbg can debug. Use the right mouse button, the toolbar icon's or enter commands directly into xsldbg's command prompt. The right mouse button menu can be called up on text that is "highlighted".

To set a breakpoint you can print the list of templates and then right mouse click on the template name listed that you want to stop at. Or move the cursor to where you want a breakpoint (The start of a node in the XSLT source or XML DATA) then click the "Stop at selected position" icon.

The "Stop at selected function" button at the moment operates exactly the same as the "Stop at selected position" icon.

Help system

xsldbg is has built help system using xml/xslt. To help an overview of commands type:

help


To get a more detailed information about a command type:

help help

Version Notes

See release notes associated with package.


FAQ

Libxslt doesn't compile

Check https://xmlsoft.org/XSLT and https://mail.gnome.org/archives/xslt/ for current issues.

Ensure that libxslt was configured with at least:

--with-debugger=yes


Where is the documentation

See the README.md in downloaded package for more information.

xsldbg compiles ok but doesn't run when used from command line/ does not start debugging

Make sure that you set and exported the correct LD_LIBRARY_PATH

Make sure that you've configure the correct libxml and libxslt prefix in libxslt, and xsldbg.

Make sure that you have a version of libxslt that has debugging support enabled this is done by default un *nix but it handled manually under other platforms

Why do I get a message about Breakpoint @ text node

xsldbg tries to find a line number near the current node. But sometimes it is unable to find a "parent" for the current node. This normally means the node is part of the document preamble, a comment node or text node.

Why does xsldbg restart when I reload the configuration

This is unavoidable because of the way xsldbg interrupts libxslt execution.

Why is the text/html output when searching not better formated

It is left up to the user to provide a stylsheet to replace docs/en/searchhtml.xsl and docs/en/search.xsl. Contributions of better XSL for search database formatting would be appreciated.

How big is this this program

At last count there was over twenty thousand lines of text in xsldbg, some of this is automatically generated. This is about the same size as the libxslt directory in the libxslt distribution.

Why do I get a strange prompt

If the prompt looks like:

(xsldbg) xsldbg_default_node >



For some reason xsldbg could not load or use the specified stylesheet or xml data file.

Try using the "source" or "data" commands and then "run".



Feedback

For problems with this project or web site please use the bug tracking system provided by Source Forge

Download

See sourceforge file downloads

Limitations

Todo

Completed Todo's



http://xsldbg.sourceforge.net/  : Helping understand stylesheets

Last updated 20th October 2018