XSL Transformations and Vim

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XSL Transformations and Vim

Alejandro Calbazana
Hello,

Does anyone have a method of applying XSL transformations using Vim?  
I'd like to apply an XSL to an opened XML document using Vim.

Thanks,

Alejandro
Reply | Threaded
Open this post in threaded view
|

Re: XSL Transformations and Vim

marc chantreux-2
Alejandro Calbazana a ?crit :
> Hello,
>
> Does anyone have a method of applying XSL transformations using Vim?  
> I'd like to apply an XSL to an opened XML document using Vim.

something like :

:%!xsltproc mystyle.xsl -

?
Reply | Threaded
Open this post in threaded view
|

Re: XSL Transformations and Vim

Tim Chase-2
In reply to this post by Alejandro Calbazana
> Does anyone have a method of applying XSL transformations
> using Vim? I'd like to apply an XSL to an opened XML document

If you've got "xsltproc" available on your system, you might be
able to do something along the lines of

        :%y|new|put|1d|%!xsltproc foo.xslt -

It does tromp on your current yank-buffer, but otherwise, it
seems to work for me.  The whole mess can be wrapped in a mapping
if so desired.

Might want to also do a "setlocal nomodified" on the resulting
buffer afterwards just to prevent it from hollering at you when
you try and close the window.

Hope this helps...

-tim