[oXygen-user] Fwd: Escaping markup, preserving contents in XProc
Oxygen XML Editor Support
support at oxygenxml.com
Wed Jan 22 08:39:16 CST 2014
Hello Wendell,
Normally, it should have worked correctly if you had specified an
appropriate encoding for the serialization.
e.g.
<p:serialization port="result" method="text" encoding="UTF-8"/>
If you don't specify an encoding, it's expected for it to use the
default platform encoding.
However, there is a bug in Calabash in that even if you specify an
encoding, it ignores it and always uses the platform encoding:
https://github.com/ndw/xmlcalabash1/issues/131
The bug has already been fixed, but I believe the bugfix is not yet
available in the released version of Calabash (1.0.16).
I can reproduce this bug with the Calabash 1.0.13 and 1.0.16 standalone
(independently from Oxygen), with *Saxon 9.5* running on Windows 7. On
Windows 7 I have the default file encoding Cp1250, so it always gets
mangled.
For the standalone Calabash I can easily work around this by forcing in
the Calabash startup script the file encoding with a Java argument:
-Dfile.encoding="UTF8"
You can do the same for Oxygen, if this is crucial for you.
For Windows/Linux, edit the corresponding .vmoptions file (e.g.
oxygen15.1.vmoptions) and on a new line add the argument mentioned
above. For For OS X, you have to Ctrl-click(or right click) on the
Oxygen application icon(Oxygen XML Editor.app) in Finder and from the
pop-up menu select Show Package Contents. Then navigate to the Contents
directory and open for editing the 'Info.plist' file. Open it with
'TextEdit' and look for the key VMOptions. Append the Java argument that
forces the encoding after the last argument (-XX:MaxPermSize=256m).
Check if the argument is correctly passed to Oxygen in Help > About,
System properties, file.encoding.
Note that forcing the default encoding in Oxygen will have some
repercussions. The default encoding for text (non-XML) files will change
to this forced value. You can manually readjust this to the correct
encoding for your platform in Options > Preferences, Encoding, 'Encoding
for non XML files'.
Let me know if you need further assistance with this.
Regards,
Adrian
Adrian Buza
oXygen XML Editor and Author Support
Tel: +1-650-352-1250 ext.202
Fax: +40-251-461482
support at oxygenxml.com
http://www.oxygenxml.com
On 21.01.2014 04:53, Wendell Piez wrote:
> Gerrit, thanks, this is useful info.
>
> It is oXygen v15.1. Sorry about that!
>
> The error isn't just with the results pane, however; it's also in the
> file written to disk.
>
> Hm. :-)
>
> Cheers, Wendell
>
> Wendell Piez | http://www.wendellpiez.com
> XML | XSLT | electronic publishing
> Eat Your Vegetables
> _____oo_________o_o___ooooo____ooooooo_^
>
>
> On Mon, Jan 20, 2014 at 5:58 PM, Imsieke, Gerrit, le-tex
> <gerrit.imsieke at le-tex.de> wrote:
>> Hi Wendell,
>>
>> this works for me both with p:escape-markup and without when I’m running
>> Calabash 1.0.13 and 1.0.16 standalone (Saxon 9.4). The version that’s
>> bundled with oXygen 15.1 seems to be 1.0.13. I don’t know what’s bundled
>> with oXygen 15.2. Wait – did you say 15.2? With 15.1, I get the same
>> results as you, i.e., a mangled bullet for p:escape-markup. It seems as
>> if the assumed encoding for the results window is incorrect in oXygen.
>>
>> Gerrit
>>
>> On 20.01.2014 21:25, Wendell Piez wrote:
>>> Hi,
>>>
>>> Don't ask why I'm doing this; I'd rather not say. :-)
>>>
>>> Running this XProc:
>>>
>>> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
>>>
>>> <p:serialization port="result" method="text"/>
>>>
>>> <p:input port="source">
>>> <p:inline>
>>> <doc>Hello bullet: •</doc>
>>> </p:inline>
>>> </p:input>
>>>
>>> <p:output port="result"/>
>>>
>>> <p:wrap name="wrap" match="/" wrapper="wrapper"/>
>>>
>>> <p:escape-markup name="escape-wrapped-contents"/>
>>>
>>> </p:declare-step>
>>>
>>> I am getting:
>>>
>>> <doc>Hello bullet: •</doc>
>>>
>>> As you can imagine, I'd like to see an honest bullet (U-2022) in the results.
>>>
>>> By commenting out the 'escape-markup' step I can see my bullet makes
>>> it through to that point.
>>>
>>> I am using Calabash inside oXygen 15.2.
>>>
>>> What am I doing wrong? Any hints?
>>>
>>> Cheers, Wendell
>>>
>>> Wendell Piez | http://www.wendellpiez.com
>>> XML | XSLT | electronic publishing
>>> Eat Your Vegetables
>>> _____oo_________o_o___ooooo____ooooooo_^
>>> _______________________________________________
>>> oXygen-user mailing list
>>> oXygen-user at oxygenxml.com
>>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>>
>> --
>> Gerrit Imsieke
>> Geschäftsführer / Managing Director
>> le-tex publishing services GmbH
>> Weissenfelser Str. 84, 04229 Leipzig, Germany
>> Phone +49 341 355356 110, Fax +49 341 355356 510
>> gerrit.imsieke at le-tex.de, http://www.le-tex.de
>>
>> Registergericht / Commercial Register: Amtsgericht Leipzig
>> Registernummer / Registration Number: HRB 24930
>>
>> Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
>> Thomas Schmidt, Dr. Reinhard Vöckler
>> _______________________________________________
>> oXygen-user mailing list
>> oXygen-user at oxygenxml.com
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20140122/2e46bfdf/attachment.html
More information about the oXygen-user
mailing list