473,545 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
+ 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:styleshe et 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">p aramA</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">p aramC</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 1453
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
3270
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" xmlns:xlink="http://www.w3.org/2000/svg"> <svg:image width="70mm" height="52.5mm" xlink:href="{$chart_C_Test_S}"/>
6
2174
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
8465
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 from this element to the doToolTip function. Ex. <td> onmouseover="doTooltip(event,<xsl:value-of select="CHALLENGE_REMARKS"/>) </td> This...
1
4988
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 hebrew. i put the next sentence in the start of the xml and the xsl:
1
1295
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 results from a query, when someone clicks on one of the names of that table. Thanks, Bruno
4
4320
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 application crashes with the same error message I would get when writing <brand no closing tag. To make everything a little stranger, even...
3
2013
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 output in a <DIVin the containing html page.
0
1469
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 me i will appreciatte : <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:fox="http://xml.apache.org/fop/extensions"...
1
4154
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" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true"> <user> <uid>0000</uid> </user>...
1
10686
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 data in sheet2 also. My code is here <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" ...
0
7479
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7411
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7926
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7439
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5987
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4962
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3468
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.