If someone can help me out with this I will reward you with baked goods!!
Saxon in .NET
I know how to run an XSLT transformation in streaming. Not a problem. What I'm trying to do now is just get a single node out of a stream that represents a huge xml document. I start with:
var xpath=@"/x/ns1:y/ns2:z";
var myStream = System.IO.File.OpenRead("c:\superHuge.xml");
XdmValue nodeZ=null;
/// now I need to find nodeZ by evaluating xpath over the XML
/// coming in over myStream
I know I could try and generate some kind of XSLT transformation on the fly, using the expression 'xpath' that would run against the stream and generate a result document that would contain the resultant node set. But for my implementation that's going to by really smelly. I need to be able to just start throwing a bunch of xpath expressions against the stream one after the other and get the resultant nodes.
Does anyone know how this can be done with Saxon EE? If it Can't is there another product that would support it?
saxon:stream(doc("file:///C:/superhuge.xml")/x/ns1:y/ns2:z)
. See saxonica.com/documentation/index.html#!sourcedocs/streaming/… for details. I am also not sure whether that feature only works with XQuery or XSLT or whether you can use it with XPath as well. But whether you use XPath or have to use XQuery should not make much of a difference. – Martin Honnen