Copied to clipboard

Flag this post as spam?

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


  • Asif Malik 203 posts 339 karma points
    Jun 19, 2012 @ 14:46
    Asif Malik
    0

    Dynamic XPath

    I am trying to get some dynamic xpath working. Thanks to http://our.umbraco.org/forum/developers/xslt/8496-Dynamic-XPath-query i have managed to get most of the way there. The problem i am now facing is that i have to do add a date filter to the XPath, from what i understand this means converting the date to 'yyyyMMdd' format and then treating as a number.

    As soon as i add Exslt.ExsltDatesAndTimes:formatdate or umbraco.library:FormatDateTime to the dynamic query string the XSLT Extension from the post above gives an error "Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function." I have searched around a bit but cant seem to work out how to get it to work.

    Your help or pointers are much appreciated.

    Thanks

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Jun 19, 2012 @ 15:39
    Lee Kelleher
    0

    Hi Asif,

    Unfortunately when you are using a library function such as "GetXmlNodeByXPath", you can't use other extension methods, as the library is missing the context of the extensions.  Plain old XPath statements I'm afraid.

    Frustrating, I know!

    Cheers, Lee.

  • Asif Malik 203 posts 339 karma points
    Jun 19, 2012 @ 16:12
    Asif Malik
    0

    thanks lee will have to rework it a bit

  • 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.

Please Sign in or register to post replies