antoine 2004/02/05 16:30:25 Modified: src/etc Tag: ANT_16_BRANCH junit-frames.xsl junit-noframes.xsl Log: Merge from HEAD PR: 19301 Submitted by: Stephane Bailliez Revision Changes Path No revision No revision 1.16.2.2 +20 -42 ant/src/etc/junit-frames.xsl Index: junit-frames.xsl =================================================================== RCS file: /home/cvs/ant/src/etc/junit-frames.xsl,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.2 diff -u -r1.16.2.1 -r1.16.2.2 --- junit-frames.xsl 6 Feb 2004 00:22:54 -0000 1.16.2.1 +++ junit-frames.xsl 6 Feb 2004 00:30:25 -0000 1.16.2.2 @@ -1,25 +1,25 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="org.apache.xalan.lib.Redirect" + xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils" extension-element-prefixes="redirect"> <xsl:output method="html" indent="yes" encoding="US-ASCII"/> <xsl:decimal-format decimal-separator="." grouping-separator=","/> <!-- - Copyright 2001-2004 Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> + Copyright 2001-2004 Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> <!-- @@ -687,21 +687,9 @@ <xsl:template name="JS-escape"> <xsl:param name="string"/> - <xsl:choose> - <xsl:when test="contains($string,"'")"> - <xsl:value-of select="substring-before($string,"'")"/>\'<xsl:call-template name="JS-escape"> - <xsl:with-param name="string" select="substring-after($string,"'")"/> - </xsl:call-template> - </xsl:when> - <xsl:when test="contains($string,'\')"> - <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape"> - <xsl:with-param name="string" select="substring-after($string,'\')"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$string"/> - </xsl:otherwise> - </xsl:choose> + <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/> + <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/> + <xsl:value-of select="$tmp2"/> </xsl:template> @@ -711,18 +699,8 @@ --> <xsl:template name="br-replace"> <xsl:param name="word"/> - <xsl:choose> - <xsl:when test="contains($word,'
')"> - <xsl:value-of select="substring-before($word,'
')"/> - <br/> - <xsl:call-template name="br-replace"> - <xsl:with-param name="word" select="substring-after($word,'
')"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$word"/> - </xsl:otherwise> - </xsl:choose> + <xsl:param name="br"><br/></xsl:param> + <xsl:value-of select='stringutils:replace(string($word),"
",$br)'/> </xsl:template> <xsl:template name="display-time"> 1.10.2.2 +22 -43 ant/src/etc/junit-noframes.xsl Index: junit-noframes.xsl =================================================================== RCS file: /home/cvs/ant/src/etc/junit-noframes.xsl,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -u -r1.10.2.1 -r1.10.2.2 --- junit-noframes.xsl 6 Feb 2004 00:22:54 -0000 1.10.2.1 +++ junit-noframes.xsl 6 Feb 2004 00:30:25 -0000 1.10.2.2 @@ -1,23 +1,24 @@ -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:lxslt="http://xml.apache.org/xslt" + xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"> <xsl:output method="html" indent="yes" encoding="US-ASCII" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" /> <xsl:decimal-format decimal-separator="." grouping-separator="," /> <!-- - Copyright 2001-2002,2004 Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> + Copyright 2001-2004 Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> <!-- @@ -430,21 +431,9 @@ <xsl:template name="JS-escape"> <xsl:param name="string"/> - <xsl:choose> - <xsl:when test="contains($string,"'")"> - <xsl:value-of select="substring-before($string,"'")"/>\'<xsl:call-template name="JS-escape"> - <xsl:with-param name="string" select="substring-after($string,"'")"/> - </xsl:call-template> - </xsl:when> - <xsl:when test="contains($string,'\')"> - <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape"> - <xsl:with-param name="string" select="substring-after($string,'\')"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$string"/> - </xsl:otherwise> - </xsl:choose> + <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/> + <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/> + <xsl:value-of select="$tmp2"/> </xsl:template> @@ -454,18 +443,8 @@ --> <xsl:template name="br-replace"> <xsl:param name="word"/> - <xsl:choose> - <xsl:when test="contains($word,'
')"> - <xsl:value-of select="substring-before($word,'
')"/> - <br/> - <xsl:call-template name="br-replace"> - <xsl:with-param name="word" select="substring-after($word,'
')"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$word"/> - </xsl:otherwise> - </xsl:choose> + <xsl:param name="br"><br/></xsl:param> + <xsl:value-of select='stringutils:replace(string($word),"
",$br)'/> </xsl:template> <xsl:template name="display-time">
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]