Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Passing an XPathNavigator to a custum function. >Thread Next - Re: Passing an XPathNavigator to a custum function. Re: Passing an XPathNavigator to a custum function.To: NULL Date: 8/3/2008 7:24:00 PM Kevin Burton wrote: > I am sorry I meant to type MoveToNext. The recursive function is listed in > the documetation for that method. XPathNavigator allows you to navigate the XPath data model, that is true. So you can navigate to a child (navigator.MoveToFirstChild()), you can navigate to the next sibling (navigator.MoveToNext()), that is all possible, but at any time the navigator is positioned on exactly one node, not on a node-set with several nodes. If you are dealing with node-sets with (potentially) several nodes then XPathNodeIterator is returned, for instance if you use the Select method of XPathNavigator http://msdn.microsoft.com/en-us/library/0ea193ac.aspx or the SelectChildren method http://msdn.microsoft.com/en-us/library/d4aaawwa.aspx. So I don't see how that example contradicts my suggestion to use XPathNodeIterator as the argument type for your extension function you call with a node-set of more than one node in your stylesheet. As long as you know you pass in a node-set with a single node you can use XPathNavigator but otherwise you need XPathNodeIterator. That is the way the API is designed. What happened to your count problem, is that solved? -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
