The web page produced by the junit-noframes.xsl patch can have javascript
errors if the value of a build property has a single-quote. It looks like
some attempt to fix this was aborted. I simply resurrected it and fixed
the problem. I based my solution on a posting at:
http://www.biglist.com/lists/xsl-list/archives/200011/msg00887.html.
K.C. Baltz
Index: junit-noframes.xsl
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/etc/junit-noframes.xsl,v
retrieving revision 1.5
diff -u -r1.5 junit-noframes.xsl
--- junit-noframes.xsl 14 Jan 2002 00:59:40 -0000 1.5
+++ junit-noframes.xsl 6 Feb 2002 19:23:39 -0000
@@ -401,14 +401,12 @@
<xsl:template name="JS-escape">
<xsl:param name="string"/>
- <xsl:choose><!-- something isn't right here, basically all single
quotes need to be replaced with backslash-single-quote
- <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: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>
<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,'\')"/>
Index: junit-frames.xsl
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/etc/junit-frames.xsl,v
retrieving revision 1.8
diff -u -r1.8 junit-frames.xsl
--- junit-frames.xsl 14 Jan 2002 00:59:40 -0000 1.8
+++ junit-frames.xsl 6 Feb 2002 19:53:46 -0000
@@ -653,14 +653,12 @@
<xsl:template name="JS-escape">
<xsl:param name="string"/>
- <xsl:choose><!-- something isn't right here, basically all single
quotes need to be replaced with backslash-single-quote
- <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: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>
<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,'\')"/>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>