W3C home > Mailing lists > Public > public-ws-desc-eds@w3.org > October 2006

2002/ws/desc/test-suite/messages ws-i.xsl,1.2,1.3

From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
Date: Sat, 21 Oct 2006 01:50:50 +0000
To: public-ws-desc-eds@w3.org
Message-Id: <E1Gb60g-00085g-TC@lionel-hutz.w3.org>

Update of /sources/public/2002/ws/desc/test-suite/messages
In directory hutz:/tmp/cvs-serv31072

Modified Files:
	ws-i.xsl 
Log Message:
Added handling of URI query parameters


Index: ws-i.xsl
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/messages/ws-i.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** ws-i.xsl	20 Oct 2006 16:17:27 -0000	1.2
--- ws-i.xsl	21 Oct 2006 01:50:48 -0000	1.3
***************
*** 98,102 ****
  	    </xsl:when>
  	    <xsl:when test='starts-with($text, "POST ")'>
! 	      <http:method value="POST"><xsl:value-of select='substring-before(substring-after($text, "POST "), " HTTP")'/></http:method>
  	    </xsl:when>
  	    <xsl:when test='starts-with($text, "PUT ")'>
--- 98,106 ----
  	    </xsl:when>
  	    <xsl:when test='starts-with($text, "POST ")'>
! 	      <http:method value="POST">
! 		<xsl:call-template name='replaceURI'>
! 		  <xsl:with-param name='text' select='substring-before(substring-after($text, "POST "), " HTTP")'/>
! 		</xsl:call-template>
! 	      </http:method>
  	    </xsl:when>
  	    <xsl:when test='starts-with($text, "PUT ")'>
***************
*** 124,127 ****
--- 128,166 ----
  	</xsl:template>
  
+ 	<xsl:template name="replaceURI">
+ 	  <xsl:param name='text'/>
+ 
+ 	  <xsl:choose>
+ 	    <xsl:when test='contains($text, "?")'>
+ 	      <http:uri><xsl:value-of select='substring-before($text, "?")'/></http:uri>
+ 	      <xsl:call-template name='replaceURIParams'>
+ 		<xsl:with-param name='text' select='substring-after($text, "?")'/>
+ 	      </xsl:call-template>
+ 	    </xsl:when>
+ 	    <xsl:otherwise>
+ 	      <http:uri><xsl:value-of select='$text'/></http:uri>
+ 	    </xsl:otherwise>
+ 	  </xsl:choose>
+ 	</xsl:template>
+ 
+ 	<xsl:template name="replaceURIParams">
+ 	  <xsl:param name='text'/>
+ 
+ 	  <xsl:choose>
+ 	    <xsl:when test='contains($text, "&amp;")'>
+ 	      <xsl:call-template name='replaceURIParams'>
+ 		<xsl:with-param name='text' select='substring-before($text, "&amp;")'/>
+ 	      </xsl:call-template>
+ 	      <xsl:call-template name='replaceURIParams'>
+ 		<xsl:with-param name='text' select='substring-after($text, "&amp;")'/>
+ 	      </xsl:call-template>
+ 	    </xsl:when>
+ 	    <xsl:when test='contains($text, "=")'>
+ 	      <http:param name='{substring-before($text, "=")}' value='{substring-after($text, "=")}' />
+ 	    </xsl:when>
+ 	  </xsl:choose>
+ 
+ 	</xsl:template>
+ 
  	<!-- http://xsltsl.sourceforge.net/ -->
  	<xsl:template name="replaceContent">
Received on Saturday, 21 October 2006 01:50:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:20 UTC