The tmxWriter calls can't *all* be together, because of the while loop
for <tu>.

Each stanza builds and writes one thing: <tmx>, <header>, <body>, <tu>,
etc.  Separating the building from the writing would lose that.

On 2013-08-01 10:19, David Mason wrote:
> In zanata-war/src/main/java/org/zanata/rest/service/TMXStreamingOutput.java:
> 
>>  
>> -      net.sf.okapi.common.LocaleId allLocale = new net.sf.okapi.common.LocaleId("*all*", false);
>> +      Text indentText = new Text("  ");
>> +      tmxWriter.write(indentText);
>> +      Element header = exportStrategy.buildHeader();
>> +      tmxWriter.write(header);
>> +      tmxWriter.newLine();
> 
> This whole chunk of code might be more readable if all the tmxWriter
> calls were together, so that it is easy to see what is being written in
> what order - the details of how each of the items are generated is at a
> lower level of abstraction so should not be mixed in, and ideally should
> be in separate methods (though that would be overkill for some of it).
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/zanata/zanata-server/pull/78/files#r5519846>.
> 


-- 
Sean Flanigan

Senior Software Engineer
Engineering - Internationalisation
Red Hat