By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,823 Members | 730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,823 IT Pros & Developers. It's quick & easy.

will <xsl:param name="myParam" select="/.."/> ever have any node

P: n/a
What will the expression "/.." in the attribute select="/.." return?

I just inherited a huge stylesheet to maintain which has a lot of
parameters such as
<xsl:param name="myParam" select="/.."/>.
And then there is a lot of conditional processing based on this
parameter. I stepped thru the code with a debugger in Oxygen and saw
that the param is always empty (0 nodes selected).

I am trying to figure what the original author of the stylesheet
intended to do. By my reasoning, select="/.." should select the parent
of the root node! And the root node has no parent!
So the parameter myParam will always be empty regardless of the input
xml.

Thanks and Regards
Rohit

Nov 27 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ju*********@gmail.com wrote:
What will the expression "/.." in the attribute select="/.." return?
An empty node-set. That means the default value of that parameter is of
type node-set but it is empty.
I am trying to figure what the original author of the stylesheet
intended to do. By my reasoning, select="/.." should select the parent
of the root node! And the root node has no parent!
So the parameter myParam will always be empty regardless of the input
xml.
But if that is a global parameter it can be set to a different value
before a transformation is run.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 28 '06 #2

P: n/a
Thanks for your response.
I guess the original author of the stylesheet forgot to set the value
of the parameters, since he uses the params in if tests.
Thanks and Regards
Rohit

Nov 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.