Home
TeamSite
display sitemap data using xsl
InterwovenIsFun
i need to display data of a sitemap using xsl. there can be any no. of parent nodes and child nodes.(depth is not fixed) i was thinking of performing recursion using call-template with parameters. can somebody guide me on this? is my approach correct? i dont want to use components,its a pure xsl file.
Find more posts tagged with
Comments
vpatel
[QUOTE=InterwovenIsFun]i need to display data of a sitemap using xsl. there can be any no. of parent nodes and child nodes.(depth is not fixed) i was thinking of performing recursion using call-template with parameters. can somebody guide me on this? is my approach correct? i dont want to use components,its a pure xsl file.[/QUOTEYour last statement makes no sense...
I think you'll be better served by using "apply-templates" rather than calling "call-template" recursively. You can get the end result either way but with one approach it'll be a "bit" easier than the other -- IMHO. There is an OOTB component for this -- you should look at that.
HTH!
InterwovenIsFun
hey...am able to retreive nodes using recursive call-template. but the problem is am not able to identify the parent nodes,as in all nodes are fetched in one go. is there a way to present it so that one can find out which are the parent nodes and which are the child nodes?
vpatel
If you would try just a little bit more and google a query like "XSL Axis Specifiers" or "XSL Parent Node". Here is one of the many results returned:
http://nwalsh.com/docs/tutorials/xsl/xsl/foil22.html
XSL Axis is one of the ways to do that. Keep in mind this is all its all contextual/relative based on the node that XSL is processing at the moment. Getting some of this in call-template may be a bit tricky.