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.
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.
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
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.
thanks lee will have to rework it a bit
is working on a reply...