[ mx4j-Patches-1340786 ] MX4J tools: XSL templates: incorrect 'url' creation.
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Patches item #1340786, was opened at 2005-10-28 18:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=450649&aid=1340786&group_id=47745
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Alexey Sergeev (alexeysergeev)
Assigned to: Nobody/Anonymous (nobody)
Summary: MX4J tools: XSL templates: incorrect 'url' creation.
Initial Comment:
XSLT files are placed in package
mx4j.tools.adaptor.http.xsl
For array file 'viewarray.xsl' is used. The following
code is used for variable 'url' creation:
<xsl:variable name="url">getattribute?objectname=
<xsl:call-template name="uri-encode">
<xsl:with-param name="uri">
<xsl:value-of select="$request.objectname"/>
</xsl:with-param>
</xsl:call-template>&attribute=
<xsl:value-of
select="$request.attribute"/>&format=array&template=viewarray&locale=
<xsl:value-of select="$request.locale"/>
</xsl:variable>
It is not correct becuase it is produces bad url, like:
....getattribute?objectname=%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20CruiseControl+Manager.....
Tag <xsl:text> should be used to get rid of unnecessary
white space (like %0A%20%). So correct code will look like:
<xsl:variable
name="url"><xsl:text>getattribute?objectname=</xsl:text>
<xsl:call-template name="uri-encode">
<xsl:with-param name="uri">
<xsl:value-of select="$request.objectname"/>
</xsl:with-param>
</xsl:call-template><xsl:text>&attribute=</xsl:text>
<xsl:value-of
select="$request.attribute"/><xsl:text>&format=array&template=viewarray&locale=</xsl:text>
<xsl:value-of select="$request.locale"/>
</xsl:variable>
The same problem exists in viewcollection.xsl and
viewmap.xsl.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=450649&aid=1340786&group_id=47745
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information