[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Param value not getting value passed

Subject: Re: Param value not getting value passed
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Jan 2011 17:14:25 -0500
Re:  Param value not getting value passed
My guess is that your stylesheet is going through the built-in template rules, which do not pass simply-passed parameter values down. What you have coded only works if the template being invoked is invoked without the built-in template rules having been invoked in-between.

Note, however, that XSLT 2 supports tunnel parameters, which can be considered to be automatically passed through every <xsl:apply-templates> and every <xsl:call-template>, including built-in template rules, without having to say so explicitly.

So, if you are running XSLT 2, try:

<xsl:with-param name="group-value" tunnel="yes" select="16"/>

... and the corresponding:

<xsl:param name="group-value" tunnel="yes" select="0"/>

BTW, you should note that:

select="number(16)"

... is redundant because just "16" is also interpreted as a number, and that

<xsl:param name="group-value">0</xsl:param>

... creates a variable of the type document tree with a root node and a text node with the character 0, whereas my use of the select attribute has the data type of number, which is what I think you are trying to use.

I hope this helps.

. . . . . . Ken

At 2011-01-30 15:05 -0700, Karl Stubsjoen wrote:
I'm perplexed.  I have a template match routine and param value that
is not receiving the param value passed.  I am passing the param value
like this:

<xsl:with-param name="group-value" select="number(16)"/>

The param is defined in the template match like this:
<xsl:param name="group-value">0</xsl:param>

The value is always:
type:ABC
value: "0"
(According to Oxygen)

I have a simple XML sample and the number param value is passed fine.
In my real example (working xml/xsl templates) it is not passed.  The
stylsheet is quite involved (over 30,000 lines).  I am stepping
through the code (I can provide screen shots) and the param value
default to the >0< "0" value.  Any ideas?  I have stepped through this
a 1/2 dozen times now!

Karl..

--
Karl Stubsjoen
MeetScoresOnline.com
(602) 845-0006


--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.