drafting “x:value-of”
Thinking about testing XML to SXML conversion to pass the second milestone, I found out that I need functionality that was planned for the future. So I temporary switched to the phase three.
I hope the only 3rd phase functionality I need at the moment is the function "x:value-of". It should run an XPath-query and convert result to SXML. Here are some steps:
* create a new XPath context using xmlXPathNewContext,
* set a context node (I forget about it, so I don't know a name yet),
* execute XPath using xmlXPathEvalExpression,
* convert to SXML using node_to_scm over values in xpathObj->nodesetval.
While revising the libxml2 types, I stumbled upon a comment to xmlNodeSet->nodeTab:
array of nodes in no particular order
Contrary to this statement, I expect that xmlXPathEvalExpression should return nodes in the document order, but it isn't mentioned in the libxml documentation. Going to ask in the libxml mailing list.