- From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 24 Oct 2006 01:31:46 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/test-suite/messages In directory hutz:/tmp/cvs-serv3616 Modified Files: ws-i.xsl Log Message: Simplified the log format Index: ws-i.xsl =================================================================== RCS file: /sources/public/2002/ws/desc/test-suite/messages/ws-i.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -C 2 -d -r1.3 -r1.4 *** ws-i.xsl 21 Oct 2006 01:50:48 -0000 1.3 --- ws-i.xsl 24 Oct 2006 01:31:44 -0000 1.4 *************** *** 7,21 **** --> ! <xsl:stylesheet version="1.0" xmlns:l="http://www.w3.org/2002/ws/addressing/logs/" xmlns:http="http://www.w3.org/2002/ws/addressing/logs/http" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wsi-log303="http://www.ws-i.org/testing/2003/03/log/" xmlns:wsi-log407="http://www.ws-i.org/testing/2004/07/log/"> <xsl:output method="xml" indent="yes"/> <xsl:variable name="bom"><?xml</xsl:variable> <xsl:variable name="gone"><?_xml</xsl:variable> <xsl:template match="wsi-log303:log"> ! <l:log xmlns:l="http://www.w3.org/2002/ws/addressing/logs/"> <xsl:for-each select="//wsi-log303:messageEntry"> <xsl:variable name="content"> <xsl:choose> ! <xsl:when test='contains(wsi-log407:httpHeaders, "Content-Type: text/xml") ! or contains(wsi-log407:httpHeaders, "Content-Type: application/soap+xml")'> <xsl:call-template name="replaceContent"> <xsl:with-param name="text" select="wsi-log303:messageContent"/> --- 7,26 ---- --> ! <xsl:stylesheet version="1.0" ! xmlns="http://www.w3.org/2002/ws/desc/logs/" ! xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ! xmlns:wsi-log303="http://www.ws-i.org/testing/2003/03/log/" ! xmlns:wsi-log407="http://www.ws-i.org/testing/2004/07/log/" ! exclude-result-prefixes='wsi-log303 wsi-log407'> <xsl:output method="xml" indent="yes"/> <xsl:variable name="bom"><?xml</xsl:variable> <xsl:variable name="gone"><?_xml</xsl:variable> <xsl:template match="wsi-log303:log"> ! <log xmlns:l="http://www.w3.org/2002/ws/addressing/logs/"> <xsl:for-each select="//wsi-log303:messageEntry"> <xsl:variable name="content"> <xsl:choose> ! <xsl:when test='contains(wsi-log303:httpHeaders, "Content-Type: text/xml") ! or contains(wsi-log303:httpHeaders, "Content-Type: application/soap+xml")'> <xsl:call-template name="replaceContent"> <xsl:with-param name="text" select="wsi-log303:messageContent"/> *************** *** 26,50 **** </xsl:when> <xsl:otherwise> ! <xsl:value-of select="wsi-log407:messageContent"/> </xsl:otherwise> </xsl:choose> </xsl:variable> ! <l:message timestamp="{@timestamp}" conversation="{@conversationID}" wsi-log303:ID="{@ID}" type="{@type}"> ! <xsl:copy-of select="wsi-log303:senderHostAndPort"/> ! <xsl:copy-of select="wsi-log303:receiverHostAndPort"/> ! <l:httpHeaders> ! <xsl:call-template name='replaceHeaders'> ! <xsl:with-param name="text" select="wsi-log303:httpHeaders"/> ! </xsl:call-template> ! </l:httpHeaders> ! <l:content> ! <xsl:value-of select="$content" disable-output-escaping="yes"/> ! </l:content> ! </l:message> </xsl:for-each> ! </l:log> </xsl:template> <xsl:template match="wsi-log407:log"> ! <l:log> <xsl:for-each select="//wsi-log407:messageEntry"> <xsl:variable name="content"> --- 31,61 ---- </xsl:when> <xsl:otherwise> ! <xsl:value-of select="wsi-log303:messageContent"/> </xsl:otherwise> </xsl:choose> </xsl:variable> ! <message timestamp="{@timestamp}" conversation="{@conversationID}" number="{@ID}" type="{@type}"> ! <senderHostAndPort> ! <xsl:copy-of select="wsi-log303:senderHostAndPort/@*"/> ! <xsl:copy-of select="wsi-log303:senderHostAndPort/*|wsi-log303:senderHostAndPort/text()"/> ! </senderHostAndPort> ! <receiverHostAndPort> ! <xsl:copy-of select="wsi-log303:receiverHostAndPort/@*"/> ! <xsl:copy-of select="wsi-log303:receiverHostAndPort/*|wsi-log303:receiverHostAndPort/text()"/> ! </receiverHostAndPort> ! <httpHeaders> ! <xsl:call-template name='replaceHeaders'> ! <xsl:with-param name="text" select="wsi-log303:httpHeaders"/> ! </xsl:call-template> ! </httpHeaders> ! <content> ! <xsl:value-of select="$content" disable-output-escaping="yes"/> ! </content> ! </message> </xsl:for-each> ! </log> </xsl:template> <xsl:template match="wsi-log407:log"> ! <log> <xsl:for-each select="//wsi-log407:messageEntry"> <xsl:variable name="content"> *************** *** 64,81 **** </xsl:choose> </xsl:variable> ! <l:message timestamp="{@timestamp}" conversation="{@conversationID}" wsi-log407:ID="{@ID}" type="{@type}"> ! <xsl:copy-of select="wsi-log407:senderHostAndPort"/> ! <xsl:copy-of select="wsi-log407:receiverHostAndPort"/> ! <l:httpHeaders> ! <xsl:call-template name='replaceHeaders'> ! <xsl:with-param name="text" select="wsi-log407:httpHeaders"/> ! </xsl:call-template> ! </l:httpHeaders> ! <l:content> ! <xsl:value-of select="$content" disable-output-escaping="yes"/> ! </l:content> ! </l:message> </xsl:for-each> ! </l:log> </xsl:template> --- 75,98 ---- </xsl:choose> </xsl:variable> ! <message timestamp="{@timestamp}" conversation="{@conversationID}" number="{@ID}" type="{@type}"> ! <senderHostAndPort> ! <xsl:copy-of select="wsi-log407:senderHostAndPort/@*"/> ! <xsl:copy-of select="wsi-log407:senderHostAndPort/*|wsi-log407:senderHostAndPort/text()"/> ! </senderHostAndPort> ! <receiverHostAndPort> ! <xsl:copy-of select="wsi-log407:receiverHostAndPort/@*"/> ! <xsl:copy-of select="wsi-log407:receiverHostAndPort/*|wsi-log407:receiverHostAndPort/text()"/> ! </receiverHostAndPort> ! <httpHeaders> ! <xsl:call-template name='replaceHeaders'> ! <xsl:with-param name="text" select="wsi-log407:httpHeaders"/> ! </xsl:call-template> ! </httpHeaders> ! <content> ! <xsl:value-of select="$content" disable-output-escaping="yes"/> ! </content> ! </message> </xsl:for-each> ! </log> </xsl:template> *************** *** 93,115 **** </xsl:when> <xsl:when test='starts-with($text, "HTTP/1.")'> ! <http:code value='{substring-before(substring-after($text, " "), " ")}'> <xsl:value-of select='$text'/> ! </http:code> </xsl:when> <xsl:when test='starts-with($text, "POST ")'> ! <http:method value="POST"> <xsl:call-template name='replaceURI'> <xsl:with-param name='text' select='substring-before(substring-after($text, "POST "), " HTTP")'/> </xsl:call-template> ! </http:method> </xsl:when> <xsl:when test='starts-with($text, "PUT ")'> ! <http:method value="PUT"><xsl:value-of select='substring-before(substring-after($text, "PUT "), " HTTP")'/></http:method> </xsl:when> <xsl:when test='starts-with($text, "GET ")'> ! <http:method value="GET"><xsl:value-of select='substring-before(substring-after($text, "POST "), " HTTP")'/></http:method> </xsl:when> <xsl:when test='starts-with($text, "DELETE ")'> ! <http:method value="DELETE"><xsl:value-of select='substring-before(substring-after($text, "POST "), " HTTP")'/></http:method> </xsl:when> <xsl:when test='contains($text, ": ")'> --- 110,144 ---- </xsl:when> <xsl:when test='starts-with($text, "HTTP/1.")'> ! <StatusCode value='{substring-before(substring-after($text, " "), " ")}'> <xsl:value-of select='$text'/> ! </StatusCode> </xsl:when> <xsl:when test='starts-with($text, "POST ")'> ! <Method value="POST"> <xsl:call-template name='replaceURI'> <xsl:with-param name='text' select='substring-before(substring-after($text, "POST "), " HTTP")'/> </xsl:call-template> ! </Method> </xsl:when> <xsl:when test='starts-with($text, "PUT ")'> ! <Method value="PUT"> ! <xsl:call-template name='replaceURI'> ! <xsl:with-param name='text' select='substring-before(substring-after($text, "PUT "), " HTTP")'/> ! </xsl:call-template> ! </Method> </xsl:when> <xsl:when test='starts-with($text, "GET ")'> ! <Method value="GET"> ! <xsl:call-template name='replaceURI'> ! <xsl:with-param name='text' select='substring-before(substring-after($text, "GET "), " HTTP")'/> ! </xsl:call-template> ! </Method> </xsl:when> <xsl:when test='starts-with($text, "DELETE ")'> ! <Method value="DELETE"> ! <xsl:call-template name='replaceURI'> ! <xsl:with-param name='text' select='substring-before(substring-after($text, "DELETE "), " HTTP")'/> ! </xsl:call-template> ! </Method> </xsl:when> <xsl:when test='contains($text, ": ")'> *************** *** 117,123 **** <xsl:value-of select='substring-before(normalize-space($text), ": ")'/> </xsl:variable> ! <http:header value='{$name}'> ! <xsl:value-of select='substring-after($text, ": ")'/> ! </http:header> </xsl:when> <xsl:otherwise> --- 146,165 ---- <xsl:value-of select='substring-before(normalize-space($text), ": ")'/> </xsl:variable> ! <xsl:element name='{$name}'> ! <xsl:variable name='content' select='substring-after($text, ": ")'/> ! <xsl:if test='$name="Content-Type"'> ! <xsl:attribute name='type'> ! <xsl:choose> ! <xsl:when test='contains($content, ";")'> ! <xsl:value-of select='substring-before($content, ";")'/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:value-of select='$content'/> ! </xsl:otherwise> ! </xsl:choose> ! </xsl:attribute> ! </xsl:if> ! <xsl:value-of select='$content'/> ! </xsl:element> </xsl:when> <xsl:otherwise> *************** *** 133,137 **** <xsl:choose> <xsl:when test='contains($text, "?")'> ! <http:uri><xsl:value-of select='substring-before($text, "?")'/></http:uri> <xsl:call-template name='replaceURIParams'> <xsl:with-param name='text' select='substring-after($text, "?")'/> --- 175,179 ---- <xsl:choose> <xsl:when test='contains($text, "?")'> ! <uri><xsl:value-of select='substring-before($text, "?")'/></uri> <xsl:call-template name='replaceURIParams'> <xsl:with-param name='text' select='substring-after($text, "?")'/> *************** *** 139,143 **** </xsl:when> <xsl:otherwise> ! <http:uri><xsl:value-of select='$text'/></http:uri> </xsl:otherwise> </xsl:choose> --- 181,185 ---- </xsl:when> <xsl:otherwise> ! <uri><xsl:value-of select='$text'/></uri> </xsl:otherwise> </xsl:choose> *************** *** 157,161 **** </xsl:when> <xsl:when test='contains($text, "=")'> ! <http:param name='{substring-before($text, "=")}' value='{substring-after($text, "=")}' /> </xsl:when> </xsl:choose> --- 199,205 ---- </xsl:when> <xsl:when test='contains($text, "=")'> ! <param name='{substring-before($text, "=")}'> ! <xsl:value-of select='substring-after($text, "=")'/> ! </param> </xsl:when> </xsl:choose>
Received on Tuesday, 24 October 2006 01:31:54 UTC