Manuel Collado wrote:
>> PS: No there is no way to make command "run" use for "%F" an encoding
>> other than UTF-8.
> 
> OK. I know now how to proceed. Re-reading the documentation after your 
> explanations make things much more clear.
> 
> But, with due respect, I still think XXE could be improved for easier 
> interoperation with external tools.
> 
> In the 'run' command, the behaviour of exporting data via %F is twofold. 
> Either plain text (for text selection) or XML fragment (XML external 
> entity) otherwise. Retrieving external data via %_ should have also 
> these two possibilities. Either retrieve as plain text, or as XML fragment.
> 
> Always converting the captured output to the internal Java encoding lets 
> further parsing of it as XML really inconsistent.
> 
> The 'read' element of the process commands provides some support for 
> this, by means of the 'encoding' parameter.
> 
> But I think a better approach is not to explicitly stating the expected 
> encoding, but to select between plain text and XML for interpreting the 
> captured data. The 'run' could have an optional 'XML' parameter to force 
> the external tool output to be handled as an XML external entity, and 
> not just as plain text. Or at least to acknowledge the encoding stated 
> in the XML declaration, if any.
> 

You are right, as always. The current (layered) implementation of
command "run" does not make it easy to improve the situation, so I
cannot promise that we'll enhance command "run" in the short tem.



Reply via email to