General XMetaL Discussion
jms July 9, 2010 at 7:44 pm
all text/code disappeared when switching to plain text view…July 9, 2010 at 7:44 pmParticipants 2Replies 3Last Activity 12 years, 7 months ago
I've been editing a document in Xmetal (5.5) all day, saving frequently. At one point I decided to switch from “tag view” to “plain text view” to fix something, and when I clicked the plain text view icon in the lower left side of the screen, all of my text/code disappeared! My whole document was blank! The obvious solution was to close, without saving, and reopen the document. I did this, but when I reopened the document, it was still blank. I have a backup from yesterday that I can recover, but have lost all of my work today 🙁
If anyone has any ideas as to what went wrong, I'd love to hear from you!
jessicaDerek Read July 9, 2010 at 9:44 pm
Reply to: all text/code disappeared when switching to plain text view…July 9, 2010 at 9:44 pm
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).jms July 14, 2010 at 3:47 pm
Reply to: all text/code disappeared when switching to plain text view…July 14, 2010 at 3:47 pm
Thanks for your reply. We have noticed how long character strings are cut off in plain text view… but what is actually happening here is not that the lines are cut off, but that all text – every bit of code and content – was wiped out. The document was completely blank.
I hope the difference here makes sense – it sounded like the solution you offered was for the former problem – if you or anyone else has any ideas about the latter problem, I'd appreciate it!
jessicaDerek Read July 14, 2010 at 5:32 pm
Reply to: all text/code disappeared when switching to plain text view…July 14, 2010 at 5:32 pm
We have not seen this to date.
It looks like someone has submitted a support case along these lines. If that was not you or someone at your organization it would be best to submit your own separate case. I suspect at this point we will need to know which DTD/XSD and customization you are working with to recreate the same setup, and try one of your documents to see if we can reproduce the issue.
- You must be logged in to reply to this topic.