473,473 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

xsl:with-param problem under Weblogic 8.1

QTR
Hello,

I discovered a strange XSLT behaviour on Weblo 8.1. Let me explain it
(see at the end my example XSLT):
I call a template (1) with one parameter (A) which calls another
template (2) with two parameters. The first parameter is param A
(obtained from template 1) and the second param comes from another
template (3) which just returns the given param (C).
The second template receives 2 params (A and C) and prints them out.
Thus, in my example I see:
param1: paramA
param2: paramC

So far so good.
The problem comes in when I change the order of the two params when
calling template 2! If I put the line which sets param1 for calling
template 2 *after* param2 then template 2 prints out 2 times the same
thing!
Thus, in my example I'd see:
param1: paramC
param2: paramC

It seems that paramA has been overwritten by paramC!
If I don't call template3 but set param2 (paramC) directly (hardcoded)
in template1 then the order of the passed params doesn't matter. Then
it works fine.

Can somebody explain me this strange behavoiur please?
BTW: I discovered this on Weblogic but on Tomcat and on IIS (MSXML2) it
works without problems!!
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="ISO-8859-1"/>

<xsl:template match="/">
<xsl:call-template name="template1">
<xsl:with-param name="paramA">paramA</xsl:with-param>
</xsl:call-template>
</xsl:template>

<xsl:template name="template1">
<xsl:param name="paramA"/>
<xsl:call-template name="template2">
<!--the following line works correctly-->
<xsl:with-param name="param1"><xsl:value-of
select="$paramA"/></xsl:with-param>
<xsl:with-param name="param2">
<xsl:call-template name="template3">
<xsl:with-param name="paramC">paramC</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
<!--the following line works incorrectly
<xsl:with-param name="param1"><xsl:value-of
select="$paramA"/></xsl:with-param>
-->
</xsl:call-template>
</xsl:template>

<xsl:template name="template2">
<xsl:param name="param1"/>
<xsl:param name="param2"/>
param1: <xsl:value-of select="$param1"/><br/>
param2: <xsl:value-of select="$param2"/><br/>
</xsl:template>

<xsl:template name="template3">
<xsl:param name="paramC"/>
<xsl:value-of select="$paramC"/>
</xsl:template>
</xsl:stylesheet>

Oct 31 '06 #1
2 1441
Sounds like a bug in Weblogic. That sort of confusion of evaluation
states is a common pitfall when designing XPath and XSLT
implementations; gods know I've tracked down and fixed enough instances
over the years...
Oct 31 '06 #2
QTR
Thanks Joseph!
I'll try to contact Bea in order to see if it's realy a Weblogic bug
and how to prevent it.

Nov 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dentaku | last post by:
I use Apache FOP to create PDF files out of XSL + XML input files. The XSL file can contain SVG-images via --- <fo:block> <fo:instream-foreign-object> <svg:svg width="70mm" height="52.5mm"...
6
by: oooooo0000000 | last post by:
I have an XML file of varying nesting depth... <catalouge> <item id="1"> <name/> <item id="23"> <name/> <item id="55"> <name/> </item>
3
by: Ofay | last post by:
I am trying to do a mouseover with tooltips with an XSL stylesheet. I want to be able to pick data from the XML using the syntax <xsl:value-of select="CHALLENGE_REMARKS"/> How do I send the data...
1
by: gadi | last post by:
Hi. i need help. i can`t use xsl to transform an xml to html using asp.net. when the xml and the xsl are in english it works fine. the problem began when the xml ans xsl have words in...
1
by: bcochofel | last post by:
Hi, I want to update part of a XML output (generated by Perl CGI). I'm using XSL to transform the XML. Can I use this approach? I need to resort the contents of a table, that gives me the...
4
by: Christofer Dutz | last post by:
Hi, I am having a small problem, that is driving me nuts. My application reads some Xml and runs 2 Xsl Transformations to generate HTML. As soon as my second XSL introduces some <br/tags, the...
3
by: confused | last post by:
Bear with me on this its a bit long. I have some xml with a section like <product> <name>a great product</name> </product> I use javascript to parse this with an xsl template and place the...
0
by: zamba | last post by:
hi im new with xsl and i have to process a xsl with a lot of xml (about 50.000) the transform is slow ..and i want to optimize my xsl . here is the example so if anybody could give some advices to...
1
by: reblace | last post by:
I'm trying to translate the following: <?xml version="1.0" encoding="UTF-8"?> <users_getInfo_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
1
by: sudhaMurugesan | last post by:
Hi all, I 've created an xsl file to create an excel Workbook with multiple worksheets, thro' xslt. My code works fine for sheet1. Sheet2 was created but has no data. So please help me to fill...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.