Hello all,
I'm thinking about developing xslt extension
element to allow HTTP posting from XSLT, which
can be especially useful for web services. Does
nanohttp in libxslt support HTTP POST?
Has anyone worked on something like that? Are there
any proposals for dealing with HTTP POSTs from
XSLT (may be in exslt)?
It would be nice if input for 'post' could be
prepared by regular XSLT and output XML could be parsed by XSLT,
something like:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"> <xsl:template match="/"> <xsl:variable name="phone">111-111-1111</xsl:variable> <xml> <exsl:post url=""http://zip.locator.com/GetZipByPhone">http://zip.locator.com/GetZipByPhone" result="xml"> <exsl:post-in> <!-- PREPARE XML DATA FOR HTTP POST --> <xml> <home-phone> <xsl:value-of select="$phone"/> </home-phone> </xml> </exsl:post-in> <exsl:post-out> <!-- APPLY XSLT TO RESULT OF HTTP POST --> <xsl:for-each select="/xml/PhoneLocation"> <Location ZipCode="{ zip}" /> </xsl:for-each> </exsl:post-out> </exsl:post> </xml> </xsl:template> </xsl:stylesheet> would do HTTP POST of
<xml>
<home-phone>111-111-1111</home-phone> </xml> and given response of
<xml>
<PhoneLocation
zip="01234"/>
</xml>
would produce output
<xml>
<Location
ZipCode="01234" />
</xml>
(All this is hypothetical example).
Does this idea make sense? Or does something like
this already exist?
Thank you for your suggestions :).
--MG
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.583 / Virus Database: 369 - Release Date: 2/11/2004 |