Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Passing an XPathNavigator to a custum function.

From: Martin Honnen <mahotrash@-----.-->
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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent