Command line help utility
There is an article over at XML.com today about a nifty utility called Ox that can provide you with documentation about those XSL or XPATH elements you can’t recall, right from the command line. The article has full notes on usage and how you can extend it with your own docs so I’ll just give you a few tips on its use.
First is that Ox assumes you are running in the same directory as it’s jar. Since I would like to fire this off from my editor that will rarely be true. You could correct this by changing the variable jarFile in the source to the location where you will keep the jar and rebuild using the provided ant script. Otherwise a modification to the provided shell script, ox.bat (I haven’t tried *nix yet), will do.
for /F "usebackq" %%i IN (`cd`) do set wrkdir=%%i
rem change the directory to where you have saved ox.jar
java -jar ox.jar %*
I assume you are using a “real” editor so from vi’s command mode:
:! ox xsl:param
Or in emacs: (Time to give up VI?):
M-! ox xsl:param
Vi will pop up a shell window and emacs will open a new buffer with the following text:
xsl:param XSLT element
Defines a parameter on the top-level and in templates
(instructions). Binds a name to a value. Default value may
be empty and a new value may be passed in.