[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Hints on http POST

Subject: Re: Hints on http POST
From: "C. Edward Porter cep@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Feb 2018 18:03:54 -0000
Re:  Hints on http POST
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:  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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.