home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2003 October / PCWELT_10_2003.ISO / pcwsoft / CUCKOO.z.exe / form-asp.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-12-17  |  1.9 KB  |  49 lines

  1. <?xml version="1.0" encoding="windows-1252"?>
  2.   <!--
  3.     cuckoo web authoring
  4.     form.xsl
  5.     Transformation used on PageBox site
  6.     Version 0.03
  7.     Copyright (c) 2000-2001 Alexis Grandemange
  8.     Mail: alexis.grandemange@pagebox.net
  9.     This program is free software; you can redistribute it and/or
  10.     modify it under the terms of the GNU Lesser General Public
  11.     License as published by the Free Software Foundation; version
  12.     2.1 of the License.
  13.     This library is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16.     GNU Lesser General Public License for more details.
  17.     A copy of the GNU Lesser General Public License lesser.txt should be
  18.     included in the distribution.
  19.   --> 
  20. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  21.   <xsl:template match="form">
  22.     <![CDATA[
  23. <%@ language="javascript" %>
  24. <h2>Welcome on <%=Request.ServerVariables("URL")%></h2>
  25. <p>Your browser is <%=Request.ServerVariables("http_user_agent")%></p>
  26. ]]>
  27.     <![CDATA[<%]]>
  28.     <xsl:value-of select="action"/>
  29.     <xsl:if test="type='get'">
  30.     <xsl:for-each select="parm">
  31.  var <xsl:value-of select="node()"/> = <![CDATA[ Request.QueryString("]]> <xsl:value-of select="node()"/><![CDATA[");
  32. ]]>
  33.     <![CDATA[ Response.Write("]]> <xsl:value-of select="node()"/> <![CDATA[=" + ]]> <xsl:value-of select="node()"/> <![CDATA[ + "<br>");
  34. ]]>
  35.     </xsl:for-each>
  36.     </xsl:if>
  37.     <xsl:if test="type='post'">
  38.     <xsl:for-each select="parm">
  39.  var <xsl:value-of select="node()"/> = <![CDATA[ Request.Form("]]> <xsl:value-of select="node()"/><![CDATA[");
  40. ]]>
  41.     <![CDATA[ Response.Write("]]> <xsl:value-of select="node()"/> <![CDATA[=" + ]]> <xsl:value-of select="node()"/> <![CDATA[ + "<br>");
  42. ]]>
  43.     </xsl:for-each>
  44.     </xsl:if>
  45. <![CDATA[
  46. %>]]>
  47.   </xsl:template>
  48. </xsl:stylesheet>
  49.