node-set

XSLT: sum of tree fragment will always return 0 !

Hello everyone, I am stuck with a problem which seems stupid but I cannot find out the solution... With XLST, I need to sum a list of values calculated by a template. So I stored these values in a tree structure (a list of "Number" elements contained in a root element "Numbers"). But whatever I try to do with this self-made list, it wil...

How do we determine if an XPath expression results in a node-set?

Given that any type other than a node-set cannot be coerced into a node-set, how do we determine,at runtime, if the result of an XPath expression is a node-set? Although I guess it shouldn't matter, I'm using Sablotron for processing. Thanks in advance. ...

XSL msxsl:node-set problem

Please help me out guys. I'm just trying to declare a simple result tree fragment and iterate over it. ... <xsl:variable name="rtf"> <item-list> <item id="1">one</item> <item id="2">two</item> <item id="3">three</item> <item id="4">four</item> </item-list> </xsl:variable> <xsl:for-each select="msxsl:node-set($rt...

Sorted exsl:node-set. Return node by it position.

Good afternoon, gentlemen. Help me solve a very simple task. I have a set of nodes <menuList> <mode name="aasdf"/> <mode name="vfssdd"/> <mode name="aswer"/> <mode name="ddffe"/> <mode name="ffrthjhj"/> <mode name="dfdf"/> <mode name="vbdg"/> <mode name="wewer"/> <mode name="mkiiu"/> <mode name="yhtyh"/> and so o...

Calling the same xsl:template for different node names of the same complex type

Hi, I'm trying to keep my xsl DRY and as a result I wanted to call the same template for 2 sections of an XML document which happen to be the same complex type (ContactDetails and AltContactDetails). Given the following XML: <?xml version="1.0" encoding="UTF-8"?> <RootNode> <Name>Bob</Name> <ContactDetails> <Address> ...

XPath problem, getting "expression must evaluate to a node-set." error..

I'm having trouble retrieving a single node by its explicit XPath that I have already found by other ways. I have node and I can get its XPath, but when I try to retrieve that same node again this time via node.XPath it gives the "expression must evaluate to a node-set" error. Shouldn't this work? I'm using HtmlAgilityPack in C# btw f...