Copied to clipboard

Flag this post as spam?

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


  • Terje 9 posts 29 karma points
    Nov 08, 2010 @ 13:06
    Terje
    0

    Xslt prblems from 4.0.4 to 4.5.2

    Hi,

    I just upgraded from 4.0.4 to 4.5.2 and have some problems with the xslt.

    What I try to do is to make a for-each based on nodeName.

    I have n nodes with the same doctype (folder)
    Under I have n nodes with the same doctype (publications)

    How to make a for-each that list all the publications based on nodeName as a parameter from the macro?

    Here is the old XSLT:
    <xsl:for-each select="$currentPage/node [@nodeName=$columnName]/node [@nodeTypeAlias='publication']">

    I thought mybe the new one should looks something like this:     

    <xsl:for-each select="$currentPage [@nodename=$columnName]/publication">
    or
    <xsl:for-each select="$currentPage/ancestor-or-self::*[@isDoc and @nodeName=$columnName]/publication">

     

    Thanks in advance!

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 08, 2010 @ 13:26
    Lee Kelleher
    0

    Hi Terje,

    You are pretty much there.  I'd go with the following:

    <xsl:for-each select="$currentPage/*[@isDoc and @nodeName = $columnName]/publication">

    Notice the casing of "@nodeName".  Might need a little re-working on the starting node - that is if it's not the $currentPage.

    Cheers, Lee.

  • Terje 9 posts 29 karma points
    Nov 08, 2010 @ 14:58
    Terje
    0

    perfect! :)

    Thanks a lot!

Please Sign in or register to post replies

Write your reply to:

Draft