![]() |
![]() | ![]() | ![]() | 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.To: NULL Date: 8/3/2008 1:22:00 PM Thank you. I think I understand the difference. The count() problem I think is related to this issue. It seems that when I have XPath expression like: abc[A= "x"]/d/e[customFunction(B)] this is "countable" but a/b/c[A="X" and customFuction(d/e/B)] is not. I don't have any specific detail right now but knowing this seems to help the situation. Thanks again. Kevin "Martin Honnen" wrote: > 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 | |||
|
