0

I got this XML file in use in Adobe-Indesign which is used for Autocorrection:

<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<autocorrect>
    <language name="English: USA" />
    <wordpairs>
        <wordpair misspelled="&#x002D;" corrected="&#x007E;" />
        <wordpair misspelled="abbout" corrected="about" />
        <wordpair misspelled="abotu" corrected="about" />
        ...

I'd like to be able to change all dashes (x002D) to tildes (x007E), even in compound words.
However, the app replaces only entire words, just like you would expect from an Autocorrect feature.
I was wondering if there was somehow a way to indicate that dashes (x002D) can be preceded or followed by a generic character.
I tried to change "standalone" to "no" but it doesn't do the job.

I hope I make myself clear enough, English is not my 1st language
Thanks

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
Vinny
  • 233
  • 2
  • 13
  • The `standalone` attribute has meaning for the XML file, not for its contents. I'd guess there isn't a way in contorting auto-correct to do this. Maybe there's a different mechanism, that replaces characters by other characters, e.g. for typing ligatures, but it's unlikely you can cheat the word auto-correct approach to work in the way you like here. – Joey Feb 03 '17 at 14:22
  • Right... I hoped there was an XML solution. Pity, but... thanks for your answer anyway! – Vinny Feb 03 '17 at 15:49
  • Well, XML is just a data representation. The actual logic is in the application and you can't change that. This also isn't really a programming question, so I suggested this question to be moved to a site that fits better. – Joey Feb 03 '17 at 16:30

0 Answers0