2002/ws/desc/test-suite/results-messages generate-xpath-assertions.xslt,1.13,1.14

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

Modified Files:
	generate-xpath-assertions.xslt 
Log Message:
Added handling of content model for HTTP binding


Index: generate-xpath-assertions.xslt
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/results-messages/generate-xpath-assertions.xslt,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** generate-xpath-assertions.xslt	10 Jan 2007 01:17:58 -0000	1.13
--- generate-xpath-assertions.xslt	10 Jan 2007 03:31:34 -0000	1.14
***************
*** 111,114 ****
--- 111,153 ----
  	  </xsl:choose>
  	</xsl:if>
+ 	<xsl:if test='m:fault'>
+ 	  <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=1</assertion>
+           <xsl:if test='m:fault/m:contentModel'>
+             <assertion><xsl:value-of select='$msg'/>/l:content/*[<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='(@type="request")
+ 		      or
+                       (@type="response"
+ 		       and count(m:fault)=0
+ 		       and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out")'>
+ 	  <!-- @@it's a GET, no body... -->
+ 	  <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/*)&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/*)=0</assertion>
+ 	    </xsl:when>
+ 	    <xsl:when test='m:messageContentModel/@type="#element"'>
+ 	      <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=1</assertion>
+ 	      <assertion>
+ 		<xsl:value-of select='$msg'/>
+ 		<xsl:text>/l:content/*[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>
        <!-- Tests specific to SOAP 1.2 bindings -->

Received on Wednesday, 10 January 2007 03:31:40 UTC