Project

Profile

Help

XQuery result wrapped format?

Added by Anonymous over 18 years ago

Legacy ID: #3456691 Legacy Poster: Jack (jack1011)

The result of a query can be wrapped using -wrap command line argument. Is there any way to do it through its Java API when embedding Saxon in an application? Thanks.


Replies (2)

RE: XQuery result wrapped format? - Added by Anonymous over 18 years ago

Legacy ID: #3457126 Legacy Poster: Michael Kay (mhkay)

Yes, this code is available in the Java API. See the methods wrap() and sendWrappedSequence() in net.sf.saxon.query.QueryResult. This is how net.sf.saxon.Query invokes it: if (wrap) { SequenceIterator results = exp.iterator(dynamicEnv); DocumentInfo resultDoc = QueryResult.wrap(results, config); QueryResult.serialize(resultDoc, new StreamResult(destination), outputProps, config); destination.close(); } Michael Kay

RE: XQuery result wrapped format? - Added by Anonymous over 18 years ago

Legacy ID: #3458910 Legacy Poster: Jack (jack1011)

Thanks, Michael.

    (1-2/2)

    Please register to reply