Home Forums General XMetaL Discussion all text/code disappeared when switching to plain text view… Reply To: all text/code disappeared when switching to plain text view…

Derek Read

Reply to: all text/code disappeared when switching to plain text view…

Most likely this means that the customization (DTD/XSD + CSS + CTM + other file types) you are using has pretty printing turned off and that the lines in the XML are very long. A limitation in Plain Text view limits the length of lines that can be displayed to 4077 characters long. After this they are not rendered, though the XML is unaffected.

If pretty printing has not been enabled then XMetaL does not insert carriage returns and the entire XML document ends up being saved as one long line. Some people prefer this as it allows for better compatibility with other software and systems they work with.

If you work in Plain Text view a lot you should consider setting up pretty printing. The file that is used to control these settings is the CTM file which is edited easily with XMetaL Developer.

Alternatively, if you are not using a customization specifically designed for your DTD or Schema (the product may have auto-generated one for you and in many cases this will obviously not be as good as a properly designed one), or you may have been told you cannot alter the customization. In this case you may wish to simply adjust the Word Wrap settings in Tools > Options on the Plain Text tab.

The Word Wrap options do not make permanent changes to the XML (ie: line wrapping is “virtual” and not saved with the XML). However, CTM pretty printing changes do insert real carriage returns into the file. CTM pretty printing is very flexible, and very powerful, but can take some effort to design and configure (and plus, ideally you either need XMetaL Developer and a proper set of XMetaL customization files or you need to get someone to make those for you).