Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In my site map I only want to output nodes of type "tab" if they are not under a "Course" page.
I can check for the Tab node like so
name() = 'Tab'
But I can't work out how to check the node's parent doctype. I thought something like this..
current()/../name()
but it doesn't work. How can I check the doctype of the parent node.
Hi,
You can use the parent axis:
<xsl:if test="./parent::Tab">the parent is of type Tab</xsl:if>
or
<xsl:if test="not(./parent::Tab)">the parent is not of type Tab</xsl:if>
Hope this helps,Tom
Thank You it does :D
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Check doctype of parent node
In my site map I only want to output nodes of type "tab" if they are not under a "Course" page.
I can check for the Tab node like so
But I can't work out how to check the node's parent doctype. I thought something like this..
but it doesn't work. How can I check the doctype of the parent node.
Hi,
You can use the parent axis:
or
Hope this helps,
Tom
Thank You it does :D
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.