Re: [xsl] Doing HTTP/POST from XSLT is fun!

Subject: Re: [xsl] Doing HTTP/POST from XSLT is fun!
From: Gunther Schadow <gunther@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 02 Dec 2002 19:19:56 -0500
Hi Daniel, I appreciate your Bahh :-) I am happily dropping my
special stuff in favor of a more standard and more widely
supported solution.

I wasn't really aware of exslt:document, and after reading
its definition on exslt.org, I am still not clear if it really
does what I need. What you may not have noticed was that my
post:message is one round-trip communication and I use it
as in:

   <xsl:variable name="response">
      <post:message url="...">
         <post:with-param name="SOAPAction" select="'order'"/>
         <order>Gimme beer.</order>
      </post:message>
   </xsl:variable>

so, are you telling me that

(a) exsl:document can both output a document to the specified
    url initially by means of POST?

(b) and that one can set the HTTP/POST request parameters and
    attributes?

if not, is there a change that this might be added to this
exsl:document specification?

Also, IMPLEMENTATIONS in http://www.exslt.org/exsl/elements/document/
says that libxslt from Daniel Veillard (where did I hear that name :-)
is the only thing that supports it?

Looks like exsl:document is somewhat similar to xsl:result-document
in XSLT v2.0. However, still, how do I set request parameters and
how do I get the result from the URL connection?

I'm thinking that may be instead of this post:message thing I should
fiddle with xsl:result-document to allow setting request parameters
(and GET/PUT discipline for the HTTP connection) as well as make it
return a potentially non-empty sequence. This would indeed serve my
need.

Why should I use exsl:document instead?

thanks,
-Gunther

Daniel Veillard wrote:

But I
am using XSLT to do web-services, and so I want to call web services
from within an XSLT script. Here is an example:

<post:message url="...">
  <post:with-param name="SOAPAction" select="..."/>
  ...
</post:message>


Bahh ... simply use


  <exslt:document="http://example.com/foo/bar";>
  </exslt:document>

no need for yet another specialized extension... It can then fallback
to PUT or POST.




--
Gunther Schadow, M.D., Ph.D.                    gschadow@xxxxxxxxxxxxxxx
Medical Information Scientist      Regenstrief Institute for Health Care
Adjunct Assistant Professor        Indiana University School of Medicine
tel:1(317)630-7960                         http://aurora.regenstrief.org



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread