Skip to Content

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.

setlocal

for /F "usebackq" %%i IN (`cd`) do set wrkdir=%%i

rem change the directory to where you have saved ox.jar

cd c:usersscripts

java -jar ox.jar %*

cd %wrkdir%

endlocal

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.

Attributes:

&nbsp name = QName for the parameter <br/>

&nbsp select = expression defining the value Pretty cool. Now how do I close that new window in emacs… C-x 1 oh of course.</p>

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply