Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / November 2006



Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
junkblog747@gmail.com - 27 Nov 2006 19:13 GMT
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
Martin Honnen - 28 Nov 2006 14:23 GMT
> 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.

Signature

    Martin Honnen
    http://JavaScript.FAQTs.com/

junkblog747@gmail.com - 28 Nov 2006 17:16 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.