Copy link to clipboard
Copied
I'm trying to migrate legacy unstructured documentation to a structured format. That legacy documents contain a lot of discretionary hyphens. Those are written to XML as ordinary hyphens, which is terrible 😃 Is there a way to remove those at any stage? Maybe with conversion table, or EDD or read/write rules?
Any help is appreciated, thanks!
Copy link to clipboard
Copied
If you simply want to remove the discretionary hyphens from the documents, you can do so with Find/Change. To enter the discretionary hyphen in a dialog box, type \-. You can then do a global to change the character to the empty string. You can change a single document, an existing book, or a new book that contains files otherwise used in multiple books.
If you want to preserve the discretionary hyphens in XML, you can declare an entity in your DTD such as:
<!ENTITY DiscretionaryHyphen "­">
Then add a r/w rule such as:
entity "DiscretionaryHyphen" is fm char 0x04;
Does your project have an XML requirement? For example, do you plan to use XSLT or deliver XML? If not, you could simply save the structured files as FM documents instead of XML and not worry about this character.
--Lynne
Copy link to clipboard
Copied
Thanks! Yes, I'd like to be able to store the project in XML. I'll consider preserving those symbols.