Browse Source

#54641: XSLTC error.

Use String.replaceAll rather than StringUtils, since some versions of Xalan
(as patched by Oracle) try to load the class while compiling the stylesheet.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1453414 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 12 years ago
parent
commit
5dd71dccde
4 changed files with 24 additions and 15 deletions
  1. +9
    -0
      WHATSNEW
  2. +5
    -5
      src/etc/junit-frames-xalan1.xsl
  3. +5
    -5
      src/etc/junit-frames.xsl
  4. +5
    -5
      src/etc/junit-noframes.xsl

+ 9
- 0
WHATSNEW View File

@@ -1,3 +1,12 @@
Changes from Ant 1.9.0 TO current
===================================

Fixed bugs:
-----------

* Corrected XSLTC error in <junitreport>.
Bugzilla Report 54641.

Changes from Ant 1.8.4 TO Ant 1.9.0
===================================



+ 5
- 5
src/etc/junit-frames-xalan1.xsl View File

@@ -2,7 +2,7 @@
<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"
xmlns:string="xalan://java.lang.String"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","/>
@@ -705,10 +705,10 @@ h6 {

<xsl:template name="JS-escape">
<xsl:param name="string"/>
<xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
<xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
<xsl:param name="tmp3" select="stringutils:replace(string($tmp2),&quot;&#10;&quot;,'\n')"/>
<xsl:param name="tmp4" select="stringutils:replace(string($tmp3),&quot;&#13;&quot;,'\r')"/>
<xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/>
<xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),&quot;'&quot;,&quot;\\&apos;&quot;)"/>
<xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2)),&quot;&#10;&quot;,'\\n')"/>
<xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3)),&quot;&#13;&quot;,'\\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>



+ 5
- 5
src/etc/junit-frames.xsl View File

@@ -2,7 +2,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
xmlns:string="xalan://java.lang.String"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","/>
@@ -864,10 +864,10 @@ h6 {

<xsl:template name="JS-escape">
<xsl:param name="string"/>
<xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
<xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
<xsl:param name="tmp3" select="stringutils:replace(string($tmp2),&quot;&#10;&quot;,'\n')"/>
<xsl:param name="tmp4" select="stringutils:replace(string($tmp3),&quot;&#13;&quot;,'\r')"/>
<xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/>
<xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),&quot;'&quot;,&quot;\\&apos;&quot;)"/>
<xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2)),&quot;&#10;&quot;,'\\n')"/>
<xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3)),&quot;&#13;&quot;,'\\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>



+ 5
- 5
src/etc/junit-noframes.xsl View File

@@ -1,7 +1,7 @@
<?xml 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">
xmlns:string="xalan://java.lang.String">
<xsl:output method="html" indent="yes" encoding="UTF-8"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
<xsl:decimal-format decimal-separator="." grouping-separator="," />
@@ -439,10 +439,10 @@

<xsl:template name="JS-escape">
<xsl:param name="string"/>
<xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
<xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
<xsl:param name="tmp3" select="stringutils:replace(string($tmp2),&quot;&#10;&quot;,'\n')"/>
<xsl:param name="tmp4" select="stringutils:replace(string($tmp3),&quot;&#13;&quot;,'\r')"/>
<xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/>
<xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),&quot;'&quot;,&quot;\\&apos;&quot;)"/>
<xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2)),&quot;&#10;&quot;,'\\n')"/>
<xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3)),&quot;&#13;&quot;,'\\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>



Loading…
Cancel
Save