Getting nodeset from uComponents Multi Node Tree Picker using XSLT
Hi everyone,
Recently I met a problem with getting nodes from Multi Node Tree Picker. Of course, I know that I it's possible to use "xsl:for-each" and GetXmlNodeById(.) function, but in my situation I need an array of nodes. I tried using make-nodeset function, but as the Tree Picker stores only node ids, it just returns array that stores IDs of the nodes. Could you please suggest as way how to solve this issue?
Then $myArray should have a node for each item in your picker with all its properties. You might need to use msxml:node-set to interact with it though - ie <xsl:value-of select="count(msml:node-set($myArray)/* [@isDoc])"/> (or it may be msxml:node-set($myArray)/*/* [@isDoc])
I would also suggest you have a look at an alternative method for working with MNTP items in XSLT - check Chriztian's blog post: http://pimpmyxslt.com/articles/multipicker/ - it works great, saves time and saves you from having to use for-each loops and GetXmlNodeById
Getting nodeset from uComponents Multi Node Tree Picker using XSLT
Hi everyone,
Recently I met a problem with getting nodes from Multi Node Tree Picker. Of course, I know that I it's possible to use "xsl:for-each" and GetXmlNodeById(.) function, but in my situation I need an array of nodes. I tried using make-nodeset function, but as the Tree Picker stores only node ids, it just returns array that stores IDs of the nodes. Could you please suggest as way how to solve this issue?
Kind regards,
Andrei
Hi Andrei
What is returned if you write this
<textarea>
<xsl:copy-of select="$currentPage/yourMultieNodeTreePickerAliasHere" />
</textarea>
Does it return anything?
/Jan
Hi,
So you are wanting an array (nodeset) with all of the actual selected nodes' data (attributes and custom properties), instead of just the node id's?
I suppose you might be able to do something like:
Then $myArray should have a node for each item in your picker with all its properties. You might need to use msxml:node-set to interact with it though - ie <xsl:value-of select="count(msml:node-set($myArray)/* [@isDoc])"/> (or it may be msxml:node-set($myArray)/*/* [@isDoc])
I would also suggest you have a look at an alternative method for working with MNTP items in XSLT - check Chriztian's blog post: http://pimpmyxslt.com/articles/multipicker/ - it works great, saves time and saves you from having to use for-each loops and GetXmlNodeById
-Tom
is working on a reply...