Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rajeev 126 posts 154 karma points
    Oct 21, 2011 @ 14:28
    Rajeev
    0

    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

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 21, 2011 @ 14:38
    Tom Fulton
    1

    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

  • Rajeev 126 posts 154 karma points
    Oct 21, 2011 @ 14:50
    Rajeev
    0

    Thank you Tom. it worked. Appreciate your quick reply.

    -Rajeev

Please Sign in or register to post replies

Write your reply to:

Draft