Home Forums DITA and XMetaL Discussion Copy & Paste from MS Word Reply To: Copy & Paste from MS Word

Derek Read

Reply to: Copy & Paste from MS Word

What ends up being transformed into DITA is dependent on what Word is putting on the clipboard and in this specific case (which I am aware of) the issue is known but not something we have much control over. In some cases Word puts multiple lists onto the clipboard even though they look like one list in Word. You can see this if you have a clipboard viewing tool (XP used to have clpbrd.exe) that will allow you to examine what Word puts on the clipboard when you do a copy.

When you paste multiple lists into a DITA document in XMetaL Author Enterprise the software does not try to guess that it should combine them. You can compare the Word behaviour to others by finding a list in an HTML page and copying and pasting that. In that case you should always get a single list in DITA, since a single list is what is put onto the clipboard (at least with every browser I've seen).

What Word puts on the clipboard might vary for different versions of Word but I suspect it is mostly due to the way the list is initially created or the kinds of Word features that have been used to edit the list and Word's internal representation of the list (which seems to treat multiple lists as one if they are right next to each other, or at least it sometimes tracks a single list using different pieces). We don't have any insight into Word's internal markup, the software just examines what has been placed on the clipboard and tries to deal with that.

I'm attaching a copy of a Word document created with Word 2010. It puts a “good” (single) list on the clipboard, at least in my testing. Copying the list using Word 2010 pasting it into XMetaL Author Enterprise (tested with version 9) results in conversion to a single ordered list in a DITA document.