I meant for the XML example to show the result of
the union of two documents results in a comment node and two elements. I
apologize for the confusion.
How can the union of two documents result in a comment node
and two elements? You can only get that if you find the children of the
document nodes, for example
For the .Net code, I populated
a List<XdmNode> with two XdmNodes created using a document builder.
I then create XdmValue taking the List<XdmNode> as the argument. And
then I pass that XdmValue into setParameter.
If you do this, the value of the parameter will be a
sequence containing two document nodes.
I was hoping
it would be the equivalent of "document(...) | document(..)".
It is. The document() function returns a document node, the
union of two document nodes is a sequence of length two (assuming they are
distinct documents, of course), and the items in that sequence are document
In either case, if you want the children of the document
nodes, you need to navigate to find them, either at the application level
or within the called stylesheet.
Did I misunderstand your suggestion earlier on how to
set a node-sequence to a parameter?
Yes, I think you have some basic
misunderstanding of the data model, and I'm not quite sure where the
problem lies. Though it's true that many people find document nodes confusing
because they are invisible in lexical XML.