Using XXE Personal Edition 4.1.0 on WindowsXP SP3 Spanish.
A problem arises when using external tools to make some complex
tranformations of XHTML document fragments. For instance, syntax
hilighting of program listings.
The XHTML configuration has been customized and now includes a command
for processing the selection with an external AWK script:
<command name="awk">
<macro>
<sequence>
<command name="run" parameter='"%C\awk" "%0" "%F"' />
<command name="paste" parameter="to %_" />
</sequence>
</macro>
</command>
It works OK for text fragments, but not for elements. The exported %F
file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<p
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ns="http://www.w3.org/1999/xhtml"
>WriteString("??Cantidad ?");</p
>
If the external transformation does nothig, and just reproduce its
input, non-ASCII characters are mangled. The original paragraph:
WriteString("?Cantidad ?");
is changed into
WriteString("??Cantidad ?");
The output of the external command keeps the original <?xml..>
declaration, but it seems that XXE ignores it, or at least ignores the
encoding specification, and pastes the text nodes as if they were
encoded in the default platform encoding (windows-1252 ~= latin1).
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado