I'd like to return a list of items from an XSLT helper function in Sitecore. The items could conceivably be from multiple different places inside the content tree, so a simple XPath expression can't be used.
I suspect that I need to do something with the XPathNodeIterator class, however I can't quite figure out how to create one that exposes a list rather than a contiguous part of the content tree.
I know that I can return a list of IDs and then iterate over those in the XSLT (what I'm currently doing), but it's messy and I'd like to get rid of it. Does anyone know how to do this?
I'm using Sitecore 6.2.