Loading ...
Sorry, an error occurred while loading the content.

REST interface to TWiki

Expand Messages
  • johncoe42
    Hello, I was attracted to REST by my experience with accessing UDDI directly from XSL, rather than using SOAP. I have a new project (with a few bugs) to access
    Message 1 of 1 , Mar 9 9:29 AM
    • 0 Attachment
      Hello, I was attracted to REST by my experience with accessing UDDI
      directly from XSL, rather than using SOAP.

      I have a new project (with a few bugs) to access (and update) TWiki
      content. I have merged the Google (XooMLe) REST interface with
      TWiki. A TWiki Edit page can be created that has Google lookup of
      Twiki content.

      I'm attempting to allow postback of new textarea content to TWiki.
      The form I create is the same as the one twiki creates,


      <head>
      <xsl:call-template name="get-wiki-head"><xsl:with-param
      name="title" select="."/></xsl:call-template>
      <!--the base tag in the header is one reason it could fail the
      post.-->

      </head>
      <body>
      <xsl:call-template name="get-wiki"><xsl:with-param
      name="title" select="."/>
      </xsl:call-template>
      <xsl:apply-templates/>
      </body>
      </html>
      ..........

      <xsl:variable name="wikiBase">http://twiki.org/cgi-
      bin/edit/Main/</xsl:variable>
      <xsl:variable name="wiki"> <xsl:value-of select="concat($wikiBase,
      $wiki-key)"/></xsl:variable>
      <xsl:template name="get-wiki">
      <xsl:param name="title"/>
      <xsl:variable name="wiki-result" select="document($wiki)"/>
      <xsl:for-each select="$wiki-result">
      <xsl:apply-templates />
      <!---------end of wiki set ------------>
      </xsl:for-each>
      </xsl:template>

      There is nothing more RESTful, than XSL document function!!!
      John
    Your message has been successfully submitted and would be delivered to recipients shortly.