W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2005

result-document href="http:// ....

From: Bernhard Zwischenbrugger <lbzwischenbrugger@fh-stpoelten.ac.at>
Date: Mon, 11 Apr 2005 14:37:22 +0200 (CEST)
Message-ID: <37900.195.202.148.13.1113223042.squirrel@mail.fh-stpoelten.ac.at>
To: "public-qt-comments@w3.org" <public-qt-comments@w3.org>

Hi all

I have a question about the URI in  results-document/@href
Is this possible to submit the result tree to the internet?

Here an example:
================
This should connect to Google und format the Google result
(you need your own key)


<xsl:stylesheet
        version="2.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns="http://www.w3.org/1999/xhtml">

<xsl:param name="searchString"/>

<xsl:template match="/">
<xsl:variable name="google-result">


<xsl:result-document href="http://api.google.com/search/beta2"
format="toc-format" validation="strict">

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <SOAP-ENV:Body>
    <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"
         SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <key xsi:type="xsd:string">kM1xqFHLpTc2lC2StK49OPkwPulNF</key>
      <q xsi:type="xsd:string"><xsl:value-of select="$searchString"/></q>
      <start xsi:type="xsd:int">0</start>
      <maxResults xsi:type="xsd:int">10</maxResults>
      <filter xsi:type="xsd:boolean">true</filter>
      <restrict xsi:type="xsd:string"></restrict>
      <safeSearch xsi:type="xsd:boolean">false</safeSearch>
      <lr xsi:type="xsd:string"></lr>
      <ie xsi:type="xsd:string">latin1</ie>
      <oe xsi:type="xsd:string">latin1</oe>
    </ns1:doGoogleSearch>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  </xsl:result-document>
</xsl:variable>

<xsl:apply-tempaltes select="$google-result" mode="design"/>

</xsl:template>


<xsl:template match="*" mode="design">
<table>
<xsl:for-each select="//item">

.....

</xsl:for-each>
</table>
</xsl:template>
Received on Tuesday, 12 April 2005 02:11:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:37 GMT