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.13,1.14

From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 10 Jan 2007 03:31:37 +0000
To: public-ws-desc-eds@w3.org
Message-Id: <E1H4UBd-0001kv-1S@lionel-hutz.w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 January 2007 03:31:42 GMT