Copied to clipboard

Flag this post as spam?

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


  • Nikolas van Etten 202 posts 162 karma points
    Mar 13, 2011 @ 20:37
    Nikolas van Etten
    0

    XPath Expression example

    I'm using the beta of 2.1 and cannot figure out how to use the XPath Expression so that only child nodes are selectable.

    Any hints?

  • Kim Andersen 1447 posts 2196 karma points MVP
    Mar 13, 2011 @ 20:39
    Kim Andersen
    0

    Hi Nikolas

    If you just want to select the childnodes from the current page try this:

    $currentPage/*[@isDoc]

    /Kim A

  • Nikolas van Etten 202 posts 162 karma points
    Mar 13, 2011 @ 21:05
    Nikolas van Etten
    0

    Hi Kim,

    Thanks for your tip! When selecting XPath type "From Current" and then use the following expression:

    *[@isDoc]

    I only get the first child element and all its child nodes. I need all of them! ;) If I use Global as XPath type and use the following expression:

    $currentPage/*[@isDoc]

    It relates to the top node.

     

    Nik

    PS. This subject is regarding the use of uComponents and not regarding the general use of XSLT! ;)

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Mar 13, 2011 @ 23:04
    Shannon Deminick
    0

    You can just use From Currrent (not global) and just don't prefix your XPath statement with a forward slash.

    This is just like normal XPath, if you are selecting anything from the current node, you don't include a forward slash.

Please Sign in or register to post replies

Write your reply to:

Draft