Calling a template recursively??
-
xsl:call-template has is own "scope" as far as variable creation. But the scope of the current node and node-list is the same as its calling parent.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
OK! can u tel me how can we get the parent node of the current node. I was thinking that while traversing through the $nodeset I shoujld chk for the existance of another CallSequence Node and the call the same template again recursively. Rocky You can't climb up a ladder with your hands in your pockets.
-
OK! can u tel me how can we get the parent node of the current node. I was thinking that while traversing through the $nodeset I shoujld chk for the existance of another CallSequence Node and the call the same template again recursively. Rocky You can't climb up a ladder with your hands in your pockets.
It can be "parent::node()" or "parent::*". I think you can specifically check if the parent has a specific name by using "parent::CallSequence"!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
It can be "parent::node()" or "parent::*". I think you can specifically check if the parent has a specific name by using "parent::CallSequence"!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
I was thinking abt starting a new articles on this but then I changed my mind again... I'm back to the recursive solution again bcz the previous one wasn't showing the right sequence and this recursive one gets a nodeset missed when it starts recursion. I'm giving the template I made and the XML I'm using. Here comes the Template! Recursive Solution
Call to
Object Type
Object Name
Interface Name
Return Code
Inputs
-
It can be "parent::node()" or "parent::*". I think you can specifically check if the parent has a specific name by using "parent::CallSequence"!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
I've found why this is missing the calling functions data As you can see this isthe basic model of recursion I'm using which was proposed by you previously. What happens is that that this condition in the choose-when actually doesnt consider whether there are some nodes above another CallSequence Clause. -------------- see this section of XML Unit ChemSepUO_382 ICapeUnit Calculate -------------- I've tried to change the conditions but its no help Rocky You can't climb up a ladder with your hands in your pockets.
-
It can be "parent::node()" or "parent::*". I think you can specifically check if the parent has a specific name by using "parent::CallSequence"!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
FINALLY !! I've DONE it... The EUREKA moment has come and I thought I should tell u first? Thanks a lot George... Its been a pleasure! "We make a living by what we get, we make a life by what we give." --Winston Churchill That's definately true!
Rocky You can't climb up a ladder with your hands in your pockets.
-
FINALLY !! I've DONE it... The EUREKA moment has come and I thought I should tell u first? Thanks a lot George... Its been a pleasure! "We make a living by what we get, we make a life by what we give." --Winston Churchill That's definately true!
Rocky You can't climb up a ladder with your hands in your pockets.
Congrats! :-D I bet you learned a lot about XSLT doing this exercise. Make sure you write down what you experienced for future reference.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
Congrats! :-D I bet you learned a lot about XSLT doing this exercise. Make sure you write down what you experienced for future reference.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
Congrats! :-D I bet you learned a lot about XSLT doing this exercise. Make sure you write down what you experienced for future reference.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
hi how ru doing? Can u plz tell me how i can get the distint nodes in an XML. I've searched and found these two options distinct-nodes function for-each-group function and the distinct-values function but I havent been able to use them properly. They belong to XSLT 2.0 and well seems to me like somethings missing. Either the namespace or something? how should I declare it? and I've also visited the saxon website. What exactly do i need to download from there?? I'm confused ? thanks in advance
Rocky You can't climb up a ladder with your hands in your pockets.
-
hi how ru doing? Can u plz tell me how i can get the distint nodes in an XML. I've searched and found these two options distinct-nodes function for-each-group function and the distinct-values function but I havent been able to use them properly. They belong to XSLT 2.0 and well seems to me like somethings missing. Either the namespace or something? how should I declare it? and I've also visited the saxon website. What exactly do i need to download from there?? I'm confused ? thanks in advance
Rocky You can't climb up a ladder with your hands in your pockets.
Actually, I am still studying XSLT 2.0 and haven't looked at those functions yet. If I get a chance, I'll play around with those functions a bit. Saxon-SA 8.9 is the commercial XSLT 2.0 product and Saxon-B 8.9 is the open source one. I believe both products for .NET are really written in Java underneath. Here is the linke again: http://saxon.sourceforge.net/[^].
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
Actually, I am still studying XSLT 2.0 and haven't looked at those functions yet. If I get a chance, I'll play around with those functions a bit. Saxon-SA 8.9 is the commercial XSLT 2.0 product and Saxon-B 8.9 is the open source one. I believe both products for .NET are really written in Java underneath. Here is the linke again: http://saxon.sourceforge.net/[^].
"We make a living by what we get, we make a life by what we give." --Winston Churchill