ASF Bugzilla – Attachment 30021 Details for
Bug 54641
XSLTC problem with StringUtils
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
First attempt at a fix
54641.diff (text/plain), 5.06 KB, created by
Jesse Glick
on 2013-03-06 02:20:32 UTC
(
hide
)
Description:
First attempt at a fix
Filename:
MIME Type:
Creator:
Jesse Glick
Created:
2013-03-06 02:20:32 UTC
Size:
5.06 KB
patch
obsolete
>Index: src/etc/junit-frames-xalan1.xsl >=================================================================== >--- src/etc/junit-frames-xalan1.xsl (revision 1453087) >+++ src/etc/junit-frames-xalan1.xsl (working copy) >@@ -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 @@ > > <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),"'","\'")"/> >- <xsl:param name="tmp3" select="stringutils:replace(string($tmp2)," ",'\n')"/> >- <xsl:param name="tmp4" select="stringutils:replace(string($tmp3)," ",'\r')"/> >+ <xsl:param name="tmp1" select="string:replace(string:new(string($string)),string:new('\'),string:new('\\'))"/> >+ <xsl:param name="tmp2" select="string:replace(string:new(string($tmp1)),string:new("'"),string:new("\'"))"/> >+ <xsl:param name="tmp3" select="string:replace(string:new(string($tmp2)),string:new(" "),string:new('\n'))"/> >+ <xsl:param name="tmp4" select="string:replace(string:new(string($tmp3)),string:new(" "),string:new('\r'))"/> > <xsl:value-of select="$tmp4"/> > </xsl:template> > >Index: src/etc/junit-noframes.xsl >=================================================================== >--- src/etc/junit-noframes.xsl (revision 1453087) >+++ src/etc/junit-noframes.xsl (working copy) >@@ -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),"'","\'")"/> >- <xsl:param name="tmp3" select="stringutils:replace(string($tmp2)," ",'\n')"/> >- <xsl:param name="tmp4" select="stringutils:replace(string($tmp3)," ",'\r')"/> >+ <xsl:param name="tmp1" select="string:replace(string:new(string($string)),string:new('\'),string:new('\\'))"/> >+ <xsl:param name="tmp2" select="string:replace(string:new(string($tmp1)),string:new("'"),string:new("\'"))"/> >+ <xsl:param name="tmp3" select="string:replace(string:new(string($tmp2)),string:new(" "),string:new('\n'))"/> >+ <xsl:param name="tmp4" select="string:replace(string:new(string($tmp3)),string:new(" "),string:new('\r'))"/> > <xsl:value-of select="$tmp4"/> > </xsl:template> > >Index: src/etc/junit-frames.xsl >=================================================================== >--- src/etc/junit-frames.xsl (revision 1453087) >+++ src/etc/junit-frames.xsl (working copy) >@@ -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 @@ > > <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),"'","\'")"/> >- <xsl:param name="tmp3" select="stringutils:replace(string($tmp2)," ",'\n')"/> >- <xsl:param name="tmp4" select="stringutils:replace(string($tmp3)," ",'\r')"/> >+ <xsl:param name="tmp1" select="string:replace(string:new(string($string)),string:new('\'),string:new('\\'))"/> >+ <xsl:param name="tmp2" select="string:replace(string:new(string($tmp1)),string:new("'"),string:new("\'"))"/> >+ <xsl:param name="tmp3" select="string:replace(string:new(string($tmp2)),string:new(" "),string:new('\n'))"/> >+ <xsl:param name="tmp4" select="string:replace(string:new(string($tmp3)),string:new(" "),string:new('\r'))"/> > <xsl:value-of select="$tmp4"/> > </xsl:template> >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 54641
: 30021