[oXygen-user] SurroundWithFragmentOperation duplicates selected string
Andreas Wagner
Andreas.Wagner at em.uni-frankfurt.de
Thu Mar 13 09:26:24 CDT 2014
Hi list,
In my oXygen Author mode framework, I want to offer an action to replace
an abbreviation with its expanded form. To give a concrete example of
one of our (TEI) files. Suppose I have a word like "accusatu." I select
it, trigger my action, get asked what it should be replaced with and get
(in code) this:
<choice><abbr>accusa.</abbr><expan>accusatus</expan></choice>
The thing is, when the selected string contains a character entity, say,
"Jtẽ", then the surrounding works okay, but the selected phrase
is *repeated after* the inserted fragment, so that I get
<choice><abbr>Jtẽ</abbr><expan>Item</expan></choice>Jtẽ
This sometimes happens and sometimes it does not. With
<choice><abbr>intẽtiõis</abbr><expan>intentionis</expan></choice>
it has just worked fine.
Note that for directly entered chars like nõ -> non, I have never
noticed this problem, only when I am using numeric character references.
Then again, it's not clear to me which cases are problematic and if they
are so always or not. (I think with the Item from the example above it
happens always.) But I don't know what distinguishes this case from the
second example.
(Also, from time to time I get errors because "The current context is
read-only", which also seems to relate to the NCR entities involved and
to how (far) I draw my selection.)
The xml fragment that the SurroundWithFragmentOperation is using is
this:
<choice xmlns="http://www.tei-c.org/ns/1.0"><abbr></abbr><expan>${ask('Wie
lautet die Expansion?', generic)}</expan></choice>
Has anyone experienced similar things or can help in some way?
Best,
Andreas
--
Dr. Andreas Wagner
Project "The School of Salamanca"
Academy of Sciences and Literature, Mainz
and Institute of Philosophy
Goethe University Frankfurt
http://salamanca.adwmainz.de
Grüneburgplatz 1 (Pf 116, R. 2.455)
60629 Frankfurt am Main
Tel. +49 (0)69/798-32774
Fax +49 (0)69/798-32794
More information about the oXygen-user
mailing list