- From: Arthur Ryman via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 27 Sep 2005 21:04:29 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/wsdl20
In directory hutz:/tmp/cvs-serv30420/wsdl20
Modified Files:
assertion-table.xsl
Log Message:
Modified assertion-table.xsl to avoid copying namespace attribute.
Index: assertion-table.xsl
===================================================================
RCS file: /sources/public/2002/ws/desc/wsdl20/assertion-table.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** assertion-table.xsl 26 Sep 2005 16:47:14 -0000 1.1
--- assertion-table.xsl 27 Sep 2005 21:04:27 -0000 1.2
***************
*** 47,51 ****
</td>
<td>
! <xsl:copy-of select="*|text()" />
</td>
</tr>
--- 47,53 ----
</td>
<td>
! <!-- Don't use <xsl:copy-of select="*|text()" /> since it copied the namespace attributes. -->
! <xsl:call-template
! name="copy-elements-and-text" />
</td>
</tr>
***************
*** 54,56 ****
--- 56,84 ----
</xsl:for-each>
</xsl:template>
+
+ <!-- Copies all the element and text node children of the current node. Use this to avoid copy-of which all copies the namespace attributes -->
+ <xsl:template name="copy-elements-and-text">
+ <xsl:for-each select="*|text()">
+ <xsl:apply-templates select="." mode="copy" />
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- Copies the current current element node, omitting the namespace attributes of this node and its children, recursively. -->
+ <xsl:template match="*" mode="copy">
+ <xsl:element name="{name()}">
+ <xsl:for-each select="@*">
+ <xsl:attribute name="{name()}">
+ <xsl:value-of select="." />
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:call-template name="copy-elements-and-text" />
+ </xsl:element>
+ </xsl:template>
+
+ <!-- Copies a text node. -->
+ <xsl:template match="text()" mode="copy">
+ <xsl:copy-of select="." />
+ </xsl:template>
+
+
</xsl:stylesheet>
Received on Tuesday, 27 September 2005 21:04:36 UTC