It doesn't stream because the StreamableString is materializing the string. Sticking an assert() in materialize() shows the stack trace: #0 0x00007fff8157482a in __kill () #1 0x00007fff830e0a9c in abort () #2 0x00007fff831135de in __assert_rtn () #3 0x000000010aa19df4 in zorba::simplestore::StreamableStringItem::materialize (this=0x7fc67a6865a0) at atomic_items.cpp:1772 #4 0x000000010aa1d596 in zorba::simplestore::StreamableStringItem::getStringValue2 (this=0x7fc67a6865a0, val=@0x7fff68c3b018) at atomic_items.cpp:1693 #5 0x000000010a1e137e in zorba::FnTokenizeIterator::nextImpl (this=0x7fc67a6aede0, result=@0x7fff68c3be80, planState=@0x7fc67a679940) at strings_impl.cpp:1706 #6 0x000000010a1d2e2c in zorba::Batcher::produceNext (this=0x7fc67a6aede0, result=@0x7fff68c3be80, planState=@0x7fc67a679940) at plan_iterator.h:531 #7 0x000000010a248815 in zorba::PlanIterator::consumeNext (result=@0x7fff68c3be80, iter=0x7fc67a6aede0, planState=@0x7fc67a679940) at plan_iterator.cpp:124 #8 0x0000000109ec835a in zorba::FunctionTraceIterator::nextImpl (this=0x7fc67a682b10, result=@0x7fff68c3be80, aPlanState=@0x7fc67a679940) at other_diagnostics_impl.cpp:43 #9 0x00000001093df3c8 in zorba::Batcher::produceNext (this=0x7fc67a682b10, result=@0x7fff68c3be80, planState=@0x7fc67a679940) at plan_iterator.h:531 #10 0x000000010a248815 in zorba::PlanIterator::consumeNext (result=@0x7fff68c3be80, iter=0x7fc67a682b10, planState=@0x7fc67a679940) at plan_iterator.cpp:124 #11 0x000000010a346b54 in zorba::UDFunctionCallIterator::nextImpl (this=0x7fc67a6a17c0, result=@0x7fff68c3be80, planState=@0x7fc67a679a20) at fncall_iterator.cpp:490 #12 0x000000010a350804 in zorba::Batcher::produceNext (this=0x7fc67a6a17c0, result=@0x7fff68c3be80, planState=@0x7fc67a679a20) at plan_iterator.h:531 #13 0x000000010a248815 in zorba::PlanIterator::consumeNext (result=@0x7fff68c3be80, iter=0x7fc67a6a17c0, planState=@0x7fc67a679a20) at plan_iterator.cpp:124 #14 0x000000010a310ccb in zorba::flwor::FLWORIterator::bindVariable (this=0x7fc67a6e6b50, varNo=0, iterState=0x7fc67a675c50, planState=@0x7fc67a679a20) at flwor_iterator.cpp:1199 #15 0x000000010a31162a in zorba::flwor::FLWORIterator::nextImpl (this=0x7fc67a6e6b50, result=@0x7fff68c3c478, planState=@0x7fc67a679a20) at flwor_iterator.cpp:948 #16 0x000000010a31c3ce in zorba::Batcher::produceNext (this=0x7fc67a6e6b50, result=@0x7fff68c3c478, planState=@0x7fc67a679a20) at plan_iterator.h:531 #17 0x000000010a248815 in zorba::PlanIterator::consumeNext (result=@0x7fff68c3c478, iter=0x7fc67a6e6b50, planState=@0x7fc67a679a20) at plan_iterator.cpp:124 #18 0x000000010a246e91 in zorba::PlanWrapper::next (this=0x7fc67b002660, result=@0x7fff68c3c478) at plan_wrapper.cpp:149 #19 0x000000010916e306 in zorba::serializer::serialize (this=0x7fff68c3c808, aObject=@0x7fff68c3c730, aOStream=@0x7fff72b43f70, aHandler=0x0) at serializer.cpp:2257 #20 0x000000010916e5d5 in zorba::serializer::serialize (this=0x7fff68c3c808, aObject=@0x7fff68c3c8d8, aOStream=@0x7fff72b43f70) at serializer.cpp:2215 #21 0x000000010909fe8f in zorba::XQueryImpl::serialize (this=0x7fc67a675330, os=@0x7fff72b43f70, aWrapper=@0x7fff68c3c998, opt=0x7fff68c3cc60) at xqueryimpl.cpp:1290 #22 0x00000001090a1203 in zorba::XQueryImpl::execute (this=0x7fc67a675330, os=@0x7fff72b43f70, opt=0x7fff68c3cc60) at xqueryimpl.cpp:1116 #23 0x00000001090448d4 in compileAndExecute (zorbaInstance=0x10b31daa0, properties=@0x7fff68c3db60, staticContext=@0x7fff68c3d8b8, qfilepath=@0x7fff68c3d8d0, qfile=@0x7fc67a674d60, outputStream=@0x7fff72b43f70, timing=@0x7fff68c3d4a8) at zorbacmd.cpp:634 #24 0x000000010904898b in main (argc=4, argv=0x7fff68c3e328) at zorbacmd.cpp:906