Thanks.

It also appears that it might work with XmlTextReader.  I didn't realize that XmlTextReader can read fragments.

XmlReader paramReader = new XmlTextReader(xmlFragment, XmlNodeType.Element, null);
XdmNode myParamNode = _processor.NewDocumentBuilder().Build(paramReader);

-John

On 12/27/06, Michael Kay < mike@saxonica.com> wrote:
Create a DocumentBuilder, and call its Build method (any variant) to parse the XML document and return the resulting document node as an instance of XdmNode. An XdmNode is an XdmValue, so it can then be passed as the second parameter of transform.SetParameter().
 
If you want to pass a node-set (node-sequence, really) containing two document nodes, construct an XdmValue using the constructor XdmValue(IEnumerable), passing as the IEnumerable an array or list containing the two XdmNode objects.
 
Regards,
 
Michael Kay
http://www.saxonica.com/
 


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of John Cavalieri
Sent: 27 December 2006 21:08
To: saxon-help@lists.sourceforge.net
Subject: [saxon] DotNet setParameter w/ node-set

Hi Mr. Kay and others,

I am stumped.  How do I pass a node-set using the setParamter method in DotNet? Something similar to the XPath expression "document".

XPath expression example:
    document(" file:///c:/Resources/blah1.xml") | document("file:///c:/Resources/blah2.xml")

This is as far I could get in C#
    XsltTransformer transform = _compiledXsl.Load();
    transform.SetParameter(new QName(null, "myParam"), XdmValue.Wrap(?????

Thanks,
John

--
John Cavalieri
john.cavalieri at gmail.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help





--
John Cavalieri
john.cavalieri@gmail.com