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
I am trying to convert 4.0 XSLT to 4.5 without success for the following lines. Could any one help me in doing this?
1) <xsl:for-each select="$currentPage/ancestor-or-self::node/node [@level = 2 and string(data[@alias='umbracoNaviHide']) != '1']">
2) <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
The translator converts this to
1) <xsl:for-each select="$currentPage/ancestor-or-self::node/* [@isDoc][@level = 2 and string(umbracoNaviHide) != '1']"> 2) <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
But this is not outputing anything. Not getting exactly the corresponding for $currentPage/ancestor-or-self::node/node?
Can any one help on this?
Thanks in advance, Rajeev
Hi Rajeev,
It looks like the converter missed changing ::node to ::* [@isDoc]. They should be:
1) <xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc]/* [@isDoc][@level = 2 and string(umbracoNaviHide) != '1']"> 2) <xsl:if test="$currentPage/ancestor-or-self::* [@isDoc]/@id = current()/@id">
This is because the old schema stored each node as <node id="..">, and the new schema stores each node using its doctype alias, <NewsPage id=".." isDoc>
See the wiki for more info and some examples.
Thanks,Tom
Thank you Tom. it worked. Appreciate your quick reply.
-Rajeev
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
Issue for converting XSLT Schema from 4.0 to 4.5
I am trying to convert 4.0 XSLT to 4.5 without success for the following lines.
Could any one help me in doing this?
1) <xsl:for-each select="$currentPage/ancestor-or-self::node/node [@level = 2 and string(data[@alias='umbracoNaviHide']) != '1']">
2) <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
The translator converts this to
1) <xsl:for-each select="$currentPage/ancestor-or-self::node/* [@isDoc][@level = 2 and string(umbracoNaviHide) != '1']">
2) <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
But this is not outputing anything. Not getting exactly the corresponding for $currentPage/ancestor-or-self::node/node?
Can any one help on this?
Thanks in advance,
Rajeev
Hi Rajeev,
It looks like the converter missed changing ::node to ::* [@isDoc]. They should be:
1) <xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc]/* [@isDoc][@level = 2 and string(umbracoNaviHide) != '1']">
2) <xsl:if test="$currentPage/ancestor-or-self::* [@isDoc]/@id = current()/@id">
This is because the old schema stored each node as <node id="..">, and the new schema stores each node using its doctype alias, <NewsPage id=".." isDoc>
See the wiki for more info and some examples.
Thanks,
Tom
Thank you Tom. it worked. Appreciate your quick reply.
-Rajeev
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.