I have a situation where I run XQuery and use either StreamResult or SAXResult (as specified by the caller to my application), and I would like an easy way to determine if the transformation produced no output. Obviously, I can put something in front of each of these Result objects to detect this, but I'm wondering if there is an easier way.
I would recommend using the run() method with a StreamResult or SAXResult only for queries that produce a well-formed XML document as their result. If the result is XML, then of course you can find out anything you need to know about it using another query.
Apart from that, I'm really not sure what you had in mind.
Log in to post a comment.