W3C home > Mailing lists > Public > public-ws-desc-eds@w3.org > January 2007

2002/ws/desc/test-suite/results-messages generate-xpath-assertions.xslt,1.15,1.16

From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 11 Jan 2007 20:54:42 +0000
To: public-ws-desc-eds@w3.org
Message-Id: <E1H56wc-0003aX-1k@lionel-hutz.w3.org>

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

Modified Files:
	generate-xpath-assertions.xslt 
Log Message:
Added the handling of Transfer-Encoding


Index: generate-xpath-assertions.xslt
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/results-messages/generate-xpath-assertions.xslt,v
retrieving revision 1.15
retrieving revision 1.16
diff -C 2 -d -r1.15 -r1.16
*** generate-xpath-assertions.xslt	10 Jan 2007 19:24:33 -0000	1.15
--- generate-xpath-assertions.xslt	11 Jan 2007 20:54:39 -0000	1.16
***************
*** 111,117 ****
  	    </xsl:when>
  	    <xsl:when test='m:fault/m:httpErrorStatusCode[@type="#any"]'>
-               <!-- Unknown error code
  	      <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:StatusCode/@value='500'</assertion>
- -->
  	    </xsl:when>
  	    <xsl:when test='m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out"'>
--- 111,115 ----
***************
*** 135,138 ****
--- 133,139 ----
  	  <!-- @@it's a GET, no body... -->
  	  <xsl:choose>
+ 	    <xsl:when test='m:httpTransferEncoding!=""'>
+ 	      <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:Transfer-Encoding='<xsl:value-of select="m:httpTransferEncoding"/>'</assertion>
+ 	    </xsl:when>
  	    <xsl:when test='m:fault'>
  	      <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=1</assertion>
***************
*** 209,291 ****
  		       and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out")'>
  	  <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:Content-Type/@type='application/soap+xml'</assertion>
! 	  <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope</assertion>
! 	</xsl:if>
! 	<xsl:if test='m:soapAction'>
! 	  <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:Content-Type[@type='application/soap+xml']/l:action="<xsl:value-of select='m:soapAction'/>"</assertion>
! 	</xsl:if>
! 	<xsl:if test='m:fault'>
! 	  <assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)=1</assertion>
! 	  <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/soap12:Fault</assertion>
!           <xsl:if test='m:fault/m:soapFaultCode[@type="code"]'>
!             <assertion><xsl:value-of select='$msg'/>
! 	    <xsl:text>/l:content/soap12:Envelope/soap12:Body/soap12:Fault/soap12:Code/soap12:Value[substring-after(.,":")="</xsl:text>
! 	    <xsl:value-of select='m:fault/m:soapFaultCode/@localName'/>
! 	    <xsl:text>" or text()="</xsl:text>
! 	    <xsl:value-of select='m:fault/m:soapFaultCode/@localName'/>
! 	    <xsl:text>"][namespace::*[.="</xsl:text>
! 	    <xsl:value-of select='m:fault/m:soapFaultCode/@namespace'/>
! 	    <xsl:text>" and local-name()=substring-before(..,":")</xsl:text>
! 	    <xsl:text>]]</xsl:text>
! 	    </assertion>
!           </xsl:if>
!           <xsl:for-each select='m:fault/m:soapFaultSubcode[@type="code"]'>
!             <assertion><xsl:value-of select='$msg'/>
! 	    <xsl:text>/l:content/soap12:Envelope/soap12:Body/soap12:Fault/soap12:Code//soap12:Subcode/soap12:Value[substring-after(.,":")="</xsl:text>
! 	    <xsl:value-of select='@localName'/>
! 	    <xsl:text>" or text()="</xsl:text>
! 	    <xsl:value-of select='@localName'/>
! 	    <xsl:text>"][namespace::*[.="</xsl:text>
! 	    <xsl:value-of select='@namespace'/>
! 	    <xsl:text>" and local-name()=substring-before(..,":")</xsl:text>
! 	    <xsl:text>]]</xsl:text>
! 	    </assertion>
!           </xsl:for-each>
!           <xsl:if test='m:fault/m:contentModel'>
!             <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/soap12:Fault/soap12:Detail/*[<xsl:text>local-name()="</xsl:text>
!             <xsl:value-of select='m:fault/m:contentModel/@localName'/>" and namespace-uri()="<xsl:value-of select='m:fault/m:contentModel/@namespace'/>"]</assertion>
!           </xsl:if>
!         </xsl:if>
! 	<xsl:if test='m:soapModule/@ref="http://www.w3.org/2002/ws/desc/6/10/test-module"'>
! 	  <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Header/module:module-test</assertion>
! 	</xsl:if>
! 	<xsl:for-each select='m:soapHeader[@required="true"]'>
! 	  <assertion>
! 	    <xsl:value-of select='$msg'/>
! 	    <xsl:text>/l:content/soap12:Envelope/soap12:Header/*[</xsl:text>
! 	    <xsl:if test='@mustUnderstand="true"'>(@soap12:mustUnderstand="true" or @soap12:mustUnderstand="1") and </xsl:if>
! 	    <xsl:text>local-name()="</xsl:text>
! 	  <xsl:value-of select='@localName'/>" and namespace-uri()="<xsl:value-of select='@namespace'/>"]</assertion>
! 	</xsl:for-each>
! 	<xsl:if test='(@type="request"
! 		       and m:soapMep!="http://www.w3.org/2003/05/soap/mep/soap-response/")
! 		      or
!                       (@type="response"
! 		       and count(m:fault)=0
! 		       and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out")'>
  	  <xsl:choose>
! 	    <xsl:when test='m:messageContentModel/@type="#any"'>
! 	      <!-- it's anything, just check the number.
! 		   is it really one or can it be more?
! 	      -->
! 	      <assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)&lt;=1</assertion>
! 	    </xsl:when>
! 	    <xsl:when test='m:messageContentModel/@type="#other"'>
! 	    </xsl:when>
! 	    <xsl:when test='m:messageContentModel/@type="#none"'>
! 	      <assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)=0</assertion>
! 	    </xsl:when>
! 	    <xsl:when test='m:messageContentModel/@type="#element"'>
! 	      <assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)=1</assertion>
! 	      <assertion>
! 		<xsl:value-of select='$msg'/>
! 		<xsl:text>/l:content/soap12:Envelope/soap12:Body/*[local-name()='</xsl:text>
! 		<xsl:value-of select='m:messageContentModel/@localName'/>
! 		<xsl:text>' and namespace-uri()='</xsl:text>
! 		<xsl:value-of select='m:messageContentModel/@namespace'/>
! 		<xsl:text>']</xsl:text>
! 	      </assertion>	  
  	    </xsl:when>
  	  </xsl:choose>
  	</xsl:if>
        </xsl:if>
      </assertionSet>
--- 210,301 ----
  		       and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out")'>
  	  <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:Content-Type/@type='application/soap+xml'</assertion>
! 	  <xsl:if test='m:soapAction'>
! 	    <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:Content-Type/l:action="<xsl:value-of select='m:soapAction'/>"</assertion>
! 	  </xsl:if>
  	  <xsl:choose>
! 	    <xsl:when test='m:httpTransferEncoding!=""'>
! 	      <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:Transfer-Encoding='<xsl:value-of select="m:httpTransferEncoding"/>'</assertion>
  	    </xsl:when>
+ 	    <xsl:otherwise>
+ 	      <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope</assertion>
+ 	    </xsl:otherwise>
  	  </xsl:choose>
  	</xsl:if>
+ 	<xsl:if test='m:httpTransferEncoding="" or not(m:httpTransferEncoding)'>
+ 	  <xsl:if test='m:fault'>
+ 	    <assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)=1</assertion>
+ 	    <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/soap12:Fault</assertion>
+ 	    <xsl:if test='m:fault/m:soapFaultCode[@type="code"]'>
+ 	      <assertion><xsl:value-of select='$msg'/>
+ 	      <xsl:text>/l:content/soap12:Envelope/soap12:Body/soap12:Fault/soap12:Code/soap12:Value[substring-after(.,":")="</xsl:text>
+ 	      <xsl:value-of select='m:fault/m:soapFaultCode/@localName'/>
+ 	      <xsl:text>" or text()="</xsl:text>
+ 	      <xsl:value-of select='m:fault/m:soapFaultCode/@localName'/>
+ 	      <xsl:text>"][namespace::*[.="</xsl:text>
+ 	      <xsl:value-of select='m:fault/m:soapFaultCode/@namespace'/>
+ 	      <xsl:text>" and local-name()=substring-before(..,":")</xsl:text>
+ 	      <xsl:text>]]</xsl:text>
+ 	      </assertion>
+ 	    </xsl:if>
+ 	    <xsl:for-each select='m:fault/m:soapFaultSubcode[@type="code"]'>
+ 	      <assertion><xsl:value-of select='$msg'/>
+ 	      <xsl:text>/l:content/soap12:Envelope/soap12:Body/soap12:Fault/soap12:Code//soap12:Subcode/soap12:Value[substring-after(.,":")="</xsl:text>
+ 	      <xsl:value-of select='@localName'/>
+ 	      <xsl:text>" or text()="</xsl:text>
+ 	      <xsl:value-of select='@localName'/>
+ 	      <xsl:text>"][namespace::*[.="</xsl:text>
+ 	      <xsl:value-of select='@namespace'/>
+ 	      <xsl:text>" and local-name()=substring-before(..,":")</xsl:text>
+ 	      <xsl:text>]]</xsl:text>
+ 	      </assertion>
+ 	    </xsl:for-each>
+ 	    <xsl:if test='m:fault/m:contentModel'>
+ 	      <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/soap12:Fault/soap12:Detail/*[<xsl:text>local-name()="</xsl:text>
+ 	      <xsl:value-of select='m:fault/m:contentModel/@localName'/>" and namespace-uri()="<xsl:value-of select='m:fault/m:contentModel/@namespace'/>"]</assertion>
+ 	    </xsl:if>
+ 	  </xsl:if>
+ 	  <xsl:if test='m:soapModule/@ref="http://www.w3.org/2002/ws/desc/6/10/test-module"'>
+ 	    <assertion><xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Header/module:module-test</assertion>
+ 	  </xsl:if>
+ 	  <xsl:for-each select='m:soapHeader[@required="true"]'>
+ 	    <assertion>
+ 	      <xsl:value-of select='$msg'/>
+ 	      <xsl:text>/l:content/soap12:Envelope/soap12:Header/*[</xsl:text>
+ 	      <xsl:if test='@mustUnderstand="true"'>(@soap12:mustUnderstand="true" or @soap12:mustUnderstand="1") and </xsl:if>
+ 	      <xsl:text>local-name()="</xsl:text>
+ 	    <xsl:value-of select='@localName'/>" and namespace-uri()="<xsl:value-of select='@namespace'/>"]</assertion>
+ 	  </xsl:for-each>
+ 	  <xsl:if test='(@type="request"
+ 			and m:soapMep!="http://www.w3.org/2003/05/soap/mep/soap-response/")
+ 			or
+ 			(@type="response"
+ 			and count(m:fault)=0
+ 			and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out")'>
+ 	    <xsl:choose>
+ 	      <xsl:when test='m:messageContentModel/@type="#any"'>
+ 		<!-- it's anything, just check the number.
+ 		     is it really one or can it be more?
+ 		-->
+ 		<assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)&lt;=1</assertion>
+ 	      </xsl:when>
+ 	      <xsl:when test='m:messageContentModel/@type="#other"'>
+ 	      </xsl:when>
+ 	      <xsl:when test='m:messageContentModel/@type="#none"'>
+ 		<assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)=0</assertion>
+ 	      </xsl:when>
+ 	      <xsl:when test='m:messageContentModel/@type="#element"'>
+ 		<assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)=1</assertion>
+ 		<assertion>
+ 		  <xsl:value-of select='$msg'/>
+ 		  <xsl:text>/l:content/soap12:Envelope/soap12:Body/*[local-name()='</xsl:text>
+ 		  <xsl:value-of select='m:messageContentModel/@localName'/>
+ 		  <xsl:text>' and namespace-uri()='</xsl:text>
+ 		  <xsl:value-of select='m:messageContentModel/@namespace'/>
+ 		  <xsl:text>']</xsl:text>
+ 		</assertion>	  
+ 	      </xsl:when>
+ 	    </xsl:choose>
+ 	  </xsl:if>
+ 	</xsl:if>
        </xsl:if>
      </assertionSet>
Received on Thursday, 11 January 2007 20:54:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 11 January 2007 20:54:46 GMT