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

[Bug 1244] New: [XSLT 2.0] question about result-document/@href

From: <bugzilla@wiggum.w3.org>
Date: Tue, 12 Apr 2005 20:26:57 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1DLRyL-0006dV-LZ@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1244

           Summary: [XSLT 2.0] question about result-document/@href
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
               URL: http://lists.w3.org/Archives/Public/public-qt-
                    comments/2005Apr/0074.html
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: cmsmcq@w3.org
         QAContact: public-qt-comments@w3.org
                CC: lbzwischenbrugger@fh-stpoelten.ac.at


[Comment entered by CMSMcQ on behalf of the originator;
the text below is copied from his comment to the
public-qt-comments list.]

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 20:26:58 GMT

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