2002/ws/desc/test-suite/results/wsdl-xslt wsdl-component-model.xslt,1.17,1.18

Update of /sources/public/2002/ws/desc/test-suite/results/wsdl-xslt
In directory hutz:/tmp/cvs-serv17642/test-suite/results/wsdl-xslt

Modified Files:
	wsdl-component-model.xslt 
Log Message:
Fixed bug in httpHeaderComponent typeDefinition ref.
Fixed bug in bindingFaultReference ref.
Moved HTTP headers to a named template.

Index: wsdl-component-model.xslt
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/results/wsdl-xslt/wsdl-component-model.xslt,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** wsdl-component-model.xslt	17 Nov 2006 16:20:33 -0000	1.17
--- wsdl-component-model.xslt	17 Nov 2006 18:13:16 -0000	1.18
***************
*** 486,514 ****
                          </xsl:if>
                      </httpcm:httpErrorStatusCode>
!                     <xsl:if test="whttp:header">
!                         <httpcm:httpHeaders>
!                             <xsl:for-each select="whttp:header">
!                                 <httpcm:httpHeaderComponent xml:id="{generate-id(.)}">
!                                     <httpcm:name>
!                                         <xsl:value-of select="@name"/>
!                                     </httpcm:name>
!                                     <httpcm:typeDefinition><xsl:attribute name="ref"><xsl:call-template name="type-ref">
!                                             <xsl:with-param name="name" select="@type"/>
!                                             <xsl:with-param name="namespace-context" select="."/>
!                                         </xsl:call-template></xsl:attribute>
!                                     </httpcm:typeDefinition>
!                                     <httpcm:required>
!                                         <xsl:choose>
!                                             <xsl:when test="@required">
!                                                 <xsl:value-of select="@required"/>
!                                             </xsl:when>
!                                             <xsl:otherwise>false</xsl:otherwise>
!                                         </xsl:choose>
!                                     </httpcm:required>
!                                     <base:parent ref="{generate-id(..)}"/>
!                                 </httpcm:httpHeaderComponent>
!                             </xsl:for-each>
!                         </httpcm:httpHeaders>
!                     </xsl:if>
                      <xsl:if test="@whttp:transferCoding">
                          <httpcm:httpTransferCoding>
--- 486,490 ----
                          </xsl:if>
                      </httpcm:httpErrorStatusCode>
!                     <xsl:call-template name="http-headers"/>
                      <xsl:if test="@whttp:transferCoding">
                          <httpcm:httpTransferCoding>
***************
*** 520,548 ****
              <xsl:if test="parent::wsdl:binding/@type='http://www.w3.org/2006/01/wsdl/soap'">
                  <soapcm:soapBindingFaultExtension>
!                     <xsl:if test="whttp:header">
!                         <httpcm:httpHeaders>
!                             <xsl:for-each select="whttp:header">
!                                 <httpcm:httpHeaderComponent xml:id="{generate-id(.)}">
!                                     <httpcm:name>
!                                         <xsl:value-of select="@name"/>
!                                     </httpcm:name>
!                                     <httpcm:typeDefinition><xsl:attribute name="ref"><xsl:call-template name="type-ref">
!                                             <xsl:with-param name="name" select="@type"/>
!                                             <xsl:with-param name="namespace-context" select="."/>
!                                         </xsl:call-template></xsl:attribute>
!                                     </httpcm:typeDefinition>
!                                     <httpcm:required>
!                                         <xsl:choose>
!                                             <xsl:when test="@required">
!                                                 <xsl:value-of select="@required"/>
!                                             </xsl:when>
!                                             <xsl:otherwise>false</xsl:otherwise>
!                                         </xsl:choose>
!                                     </httpcm:required>
!                                     <base:parent ref="{generate-id(..)}"/>
!                                 </httpcm:httpHeaderComponent>
!                             </xsl:for-each>
!                         </httpcm:httpHeaders>
!                     </xsl:if>
                      <xsl:if test="@whttp:transferCoding">
                          <httpcm:httpTransferCoding>
--- 496,500 ----
              <xsl:if test="parent::wsdl:binding/@type='http://www.w3.org/2006/01/wsdl/soap'">
                  <soapcm:soapBindingFaultExtension>
!                     <xsl:call-template name="http-headers"/>
                      <xsl:if test="@whttp:transferCoding">
                          <httpcm:httpTransferCoding>
***************
*** 716,744 ****
              <xsl:if test="ancestor::wsdl:binding/@type='http://www.w3.org/2006/01/wsdl/http'">
                  <httpcm:httpBindingMessageReferenceExtension>
!                     <xsl:if test="whttp:header">
!                         <httpcm:httpHeaders>
!                             <xsl:for-each select="whttp:header">
!                                 <httpcm:httpHeaderComponent xml:id="{generate-id(.)}">
!                                     <httpcm:name>
!                                         <xsl:value-of select="@name"/>
!                                     </httpcm:name>
!                                     <httpcm:typeDefinition><xsl:attribute name="ref"><xsl:call-template name="type-ref">
!                                         <xsl:with-param name="name" select="@type"/>
!                                         <xsl:with-param name="namespace-context" select="."/>
!                                     </xsl:call-template></xsl:attribute>
!                                     </httpcm:typeDefinition>
!                                     <httpcm:required>
!                                         <xsl:choose>
!                                             <xsl:when test="@required">
!                                                 <xsl:value-of select="@required"/>
!                                             </xsl:when>
!                                             <xsl:otherwise>false</xsl:otherwise>
!                                         </xsl:choose>
!                                     </httpcm:required>
!                                     <base:parent ref="{generate-id(..)}"/>
!                                 </httpcm:httpHeaderComponent>
!                             </xsl:for-each>
!                         </httpcm:httpHeaders>
!                     </xsl:if>
                      <xsl:if test="@whttp:transferCoding">
                          <httpcm:httpTransferCoding>
--- 668,672 ----
              <xsl:if test="ancestor::wsdl:binding/@type='http://www.w3.org/2006/01/wsdl/http'">
                  <httpcm:httpBindingMessageReferenceExtension>
!                     <xsl:call-template name="http-headers"/>
                      <xsl:if test="@whttp:transferCoding">
                          <httpcm:httpTransferCoding>
***************
*** 760,767 ****
          <bindingFaultReferenceComponent xml:id="{generate-id(.)}">
              <interfaceFaultReference><xsl:attribute name="ref">
!                 <xsl:call-template name="fault-ref">
!                     <xsl:with-param name="name" select="@ref"/>
                      <xsl:with-param name="namespace-context" select="."/>
-                     <xsl:with-param name="interface" select="ancestor::wsdl:binding/@interface"/>
                  </xsl:call-template>
              </xsl:attribute></interfaceFaultReference>
--- 688,707 ----
          <bindingFaultReferenceComponent xml:id="{generate-id(.)}">
              <interfaceFaultReference><xsl:attribute name="ref">
!                 <xsl:call-template name="fault-reference-ref">
!                     <xsl:with-param name="label" >
!                         <xsl:choose>
!                             <xsl:when test="@messageLabel">
!                                 <xsl:value-of select="@messageLabel"/>
!                             </xsl:when>
!                             <xsl:otherwise>
!                                 <xsl:choose>
!                                     <xsl:when test="self::wsdl:infault">In</xsl:when>
!                                     <xsl:when test="self::wsdl:outfault">Out</xsl:when>
!                                 </xsl:choose>
!                             </xsl:otherwise>
!                         </xsl:choose>
!                     </xsl:with-param>
!                     <xsl:with-param name="operation" select="../@ref"/>
                      <xsl:with-param name="namespace-context" select="."/>
                  </xsl:call-template>
              </xsl:attribute></interfaceFaultReference>
***************
*** 866,872 ****
          <xsl:variable name="prefix" select="substring-before($name,':')"/>
          <xsl:variable name="namespace-name" select="$namespace-context/namespace::*[local-name()=$prefix]"/>
!         <xsl:for-each select="$all-types[@name=$local-name][not(../@targetNamespace) or ../@targetNamespace=$namespace-name]">
!             <xsl:value-of select="generate-id(.)"/>
!         </xsl:for-each>
      </xsl:template>
      <xsl:template name="fault-ref">
--- 806,817 ----
          <xsl:variable name="prefix" select="substring-before($name,':')"/>
          <xsl:variable name="namespace-name" select="$namespace-context/namespace::*[local-name()=$prefix]"/>
!         <xsl:choose>
!             <xsl:when test="$namespace-name = 'http://www.w3.org/2001/XMLSchema'">xs-<xsl:value-of select="$local-name"/></xsl:when>
!             <xsl:otherwise>
!                 <xsl:for-each select="$all-types[@name=$local-name][not(../@targetNamespace) or ../@targetNamespace=$namespace-name]">
!                     <xsl:value-of select="generate-id(.)"/>
!                 </xsl:for-each>
!             </xsl:otherwise>
!         </xsl:choose>
      </xsl:template>
      <xsl:template name="fault-ref">
***************
*** 894,897 ****
--- 839,858 ----
          </xsl:for-each>
      </xsl:template>
+     <xsl:template name="fault-reference-ref">
+         <xsl:param name="label"/>
+         <xsl:param name="operation"/>
+         <xsl:param name="namespace-context"/>
+         <xsl:variable name="local-name" select="substring-after($operation,':')"/>
+         <xsl:variable name="prefix" select="substring-before($operation,':')"/>
+         <xsl:variable name="namespace-name" select="$namespace-context/namespace::*[local-name()=$prefix]"/>
+         <xsl:for-each select="$all-operations[@name=$local-name][ancestor::wsdl:description/@targetNamespace=$namespace-name]">
+             <xsl:value-of select="generate-id(
+                 wsdl:infault[@messageLabel and @messageLabel=$label] |
+                 wsdl:outfault[@messageLabel and @messageLabel=$label] |
+                 wsdl:infault[$label='In'] |
+                 wsdl:outfault[$label='Out']
+                 )"/>
+         </xsl:for-each>
+     </xsl:template>
      <xsl:template name="interface-ref">
          <xsl:param name="name"/>
***************
*** 1365,1368 ****
--- 1326,1356 ----
          </xsl:if>
      </xsl:template>
+     <xsl:template name="http-headers">
+         <xsl:if test="whttp:header">
+             <httpcm:httpHeaders>
+                 <xsl:for-each select="whttp:header">
+                     <httpcm:httpHeaderComponent xml:id="{generate-id(.)}">
+                         <httpcm:name>
+                             <xsl:value-of select="@name"/>
+                         </httpcm:name>
+                         <httpcm:typeDefinition><xsl:attribute name="ref"><xsl:call-template name="type-ref">
+                             <xsl:with-param name="name" select="@type"/>
+                             <xsl:with-param name="namespace-context" select="."/>
+                         </xsl:call-template></xsl:attribute>
+                         </httpcm:typeDefinition>
+                         <httpcm:required>
+                             <xsl:choose>
+                                 <xsl:when test="@required">
+                                     <xsl:value-of select="@required"/>
+                                 </xsl:when>
+                                 <xsl:otherwise>false</xsl:otherwise>
+                             </xsl:choose>
+                         </httpcm:required>
+                         <base:parent ref="{generate-id(..)}"/>
+                     </httpcm:httpHeaderComponent>
+                 </xsl:for-each>
+             </httpcm:httpHeaders>
+         </xsl:if>
+     </xsl:template>
      <xsl:template name="soap-subcodes">
          <xsl:param name="list"/>

Received on Friday, 17 November 2006 18:13:23 UTC