Closed deathiop closed 4 years ago
Hi @deathiop - Glad to see you found it. I haven't worked on it for some time, but it does work. I am sure it could improve... and I am open to feedback and pull requests. I may be able to do quick features if time permits and they aren't too complex. But I am also open to pull requests.
I mostly use it to tag XSLT 2.0. However you'll notice it is written to use multiple xslt processors... and that I wrote the common parts (https://github.com/darcyparker/xsltctags/blob/master/xsl/xsltctags-common.xsl) in XSLT 1.0. There are 2 variants that use the common xslt: https://github.com/darcyparker/xsltctags/blob/master/xsl/xsltctags-saxon.xsl and https://github.com/darcyparker/xsltctags/blob/master/xsl/xsltctags-xsltproc.xsl I like the xsltproc variant because it starts up quickly compared to saxon. (Saxon as you probably know is fast and more powerful... but it is slow to startup the JVM.) I like the saxon variant because you get column numbers in addition to the line numbers in the ctag output. The xsltproc version is faster... but last I checked, the extension function to get the column number was not available. I wrote a bug/ticket requesting the feature, but I don't think it has been worked on.
There are 2 example scripts (bash and windows cmd) for running the ctags: https://github.com/darcyparker/xsltctags/blob/master/xsltctags and https://github.com/darcyparker/xsltctags/blob/master/xsltctags.cmd
In my dot files here: https://github.com/darcyparker/my_dotfiles/blob/587820e96805da80875346d3a6916ea8d84f178f/common/vim.dot_symlink/bundle_mine/xsltctags/ftplugin/xslt/tagbar-xslt.vim you can see an example of configuring the xslt ctags with tagbar in vim. One or both of the bash/cmd scripts can create a template of this file for you.
What would you be using the xslt ctags with? Windows, or unix/bash? Are you able to figure out the scripts? Or do you need some help figuring out how to use them?
BTW: If you like xslt, you may like some of my ant tasks: https://github.com/darcyparker/ant-hology/tree/master/tasks I wrote them because I found a lot of bugs with the OOTB ant tasks for xslt and I also had a need to compile and re-run the same compiled XSLT over and over again on many files. Keeping the JVM open and caching the compiled template improves performance a lot. (task-saxonb.xml points to a js script for running saxon....)
It seems that Universal ctags has an improved xsd/xslt support http://docs.ctags.io/en/latest/parser-xslt.html I don't know if it is better than your plugin.
@encolpe - Thanks for letting me know about the universal ctags. I haven't used the universal ctags for xslt but I remember exhuberant ctags didn't fit my needs. ( exhuberant ctags used regexes to parse... whereas mine uses xml parser.) Mine is probably still better than the current one because it supports XSLT 2.0. Here's the types I am parsing: https://github.com/darcyparker/xsltctags/blob/master/xsl/xsltctags-common.xsl#L90-L117
Closing this since I forgot to do so a long time ago. Thanks for the answers!
Hey @darcyparker,
Sorry to open an issue but it seems to be the most efficient way to ask this. While wondering if ctags for xslt existed, I found your work.
May you give some information about it? Do you consider it a working piece of soft?