Telling DT that a file type is XML

I’m adding a considerable number of DITA files to my DT database, and I would like to be able to display their content, as opposed to just their icons.

Given that the files in questions (.dita, .ditamap, .ditaval) are plain XML – which DT can display – is there a way to tell it to handle these file types as XML?

Thanks
Jan Barth

Try this (covered in the built-in Help > DEVONthink (Pro / Pro Office) Help > Documentation > Appendix > Hidden Preferences

Quit DEVONthink and open Terminal.app.
Copy and paste…


defaults write com.devon-technologies.thinkpro2 AdditionalPlainTextExtensions .dita.ditamap.ditaval

```Press Return and relaunch DEVONthink.

You [i]may[/i] need to reimport the files to have them recorgnized.

[i]Edited for idiotic typo)[/i]

Thanks! That takes me most of the way there. (With a small procedural change: The shell command gave an error message – “The domain/default pair of (/Users/jan/Library/Preferences/com.devon-technologies.thinkpro2, AdditionalPlainTextExtensions) does not exist” – but the setting could be added with the Plist editor in Xcode.)

The icing on the cake would be if a similar setting existed for XML files, so that the added file types would get the syntax highlighting. Maybe that could be added in a future version?

Syntax highlighting hasn’t been requested often (actually this is the first one I’ve seen in four years), but you never know what me may do in the future. :smiley:

PS: Apologies. I was working on two things at once and yes, it should read defaults write. Corrected now.

Just to be sure there is no misunderstanding: I wasn’t proposing additional syntax highlighting. It’s just that XML files currently do get a little bit of syntax highlighting.

If one could specify, e.g., .dita files as XML files (instead of generic text files), they would also get that touch of syntax highlight.

That was my proposal: Introduce a way to specify additional XML file types, in the same way that today additional text file types can be specified.

Regards
Jan Barth

The next release will support the extensions .dita, .ditamap & .ditaval.

Great, thanks! :smiley: