Subject: Re: [xsl] Hints on http POST From: "C. Edward Porter cep@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 2 Feb 2018 18:03:54 -0000 |
Wendell, If youbre using Saxon, you could write a simple class to do the HTTP request and return the results. Therebs a stack overflow thread on this: https://stackoverflow.com/questions/12761744/call-java-instance-methods-in-xs lt -Edward From: Lizzi, Vincent vincent.lizzi@xxxxxxxxxxxxxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Friday, February 02, 2018 12:56 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Hints on http POST Hi Wendell, I wish I had the answer, as there are situations where being able to make non-trivial HTTP calls from within XSLT would be useful. I can offer what has worked for me, which is essentially to use XQuery to run the XSLT and make the HTTP requests. Have a look at http://docs.basex.org/wiki/HTTP_Module and http://docs.basex.org/wiki/XSLT_Module for BaseX (other products have similar capability). It is fairly easy to write a query that pipelines the XSLT and HTTP request. This is kind of a workaround rather than an exact answer to your question. Vincent From: Wendell Piez wapiez@xxxxxxxxxxxxxxx<mailto:wapiez@xxxxxxxxxxxxxxx> [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Friday, February 02, 2018 12:36 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: [xsl] Hints on http POST XSL friends, I have a need to procure a little bit of XML from a web service running locally. To get it (once) from curl is easy: curl -X POST -d "My string goes in here" localhost:8888/do/me But I need to call it many many times, which I would naturally like to do from inside my transformation. Does anyone have any neat hints of how to do this under unextended (or openly extended) XSLT 3.0? I might also consider XProc except as I said this is very granular, a natural for XSLT. Many thanks, Wendell -- Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^ XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list> EasyUnsubscribe<-list/2643334> (by email<>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Hints on http POST, Lizzi, Vincent vince | Thread | Re: [xsl] Hints on http POST, Michael Kay mike@xxx |
Re: [xsl] Hints on http POST, Lizzi, Vincent vince | Date | Re: [xsl] Hints on http POST, Martin Honnen martin |
Month |