mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-29 08:36:45 +01:00
xslt: flush xsl:message output as we go
This commit is contained in:
parent
8a3ca80b15
commit
bbbdcf7593
2 changed files with 8 additions and 2 deletions
|
@ -72,7 +72,11 @@ public:
|
|||
return !to_msg_ ? sink_ : message_sink_.asOutput();
|
||||
} // sink
|
||||
void redirectToMessageSink() { ++to_msg_; }
|
||||
void revertFromMessageSink() { --to_msg_; }
|
||||
void revertFromMessageSink() {
|
||||
--to_msg_;
|
||||
if (to_msg_ == 0)
|
||||
message_sink_.flush();
|
||||
}
|
||||
|
||||
const Arabica::XPath::ExecutionContext<string_type, string_adaptor>& xpathContext() const { return xpathContext_; }
|
||||
|
||||
|
|
|
@ -110,11 +110,13 @@ public:
|
|||
|
||||
~StreamSink()
|
||||
{
|
||||
stream_.flush();
|
||||
flush();
|
||||
} // ~StreamSink
|
||||
|
||||
virtual Output<string_type, string_adaptor>& asOutput() { return *this; }
|
||||
|
||||
void flush() { stream_ << std::endl; }
|
||||
|
||||
protected:
|
||||
typedef typename Output<string_type, string_adaptor>::Settings Settings;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue