OmniGraffle file format

Ken Case kc at omnigroup.com
Thu Feb 2 11:02:31 PST 2006


On Feb 2, 2006, at 10:14 , Trevor Harmon wrote:
> Is there at least a DTD or XSD for the OmniGraffle XML format?

Well, yes, strictly speaking there is a DTD for the property list  
format which we use:  you'll find it at <http://www.apple.com/DTDs/ 
PropertyList-1.0.dtd>.

But that's not as useful as it might sound:  it will help you  
correctly read or write a generic property list, but it doesn't help  
you read and write OmniGraffle property lists.

A direction we're considering for the future is move to archiving  
things directly into XML rather than as a property list which is  
encoded as XML.  For example, rather than writing our layers like this:

         <key>Layers</key>
         <array>
                 <dict>
                         <key>Lock</key>
                         <string>NO</string>
                         <key>Name</key>
                         <string>Layer 1</string>
                         <key>Print</key>
                         <string>YES</string>
                         <key>View</key>
                         <string>YES</string>
                 </dict>
         </array>

We might write our layers like this:

	<layers>
		<layer lock=NO name="Layer 1" print=YES view=YES>
	</layers>

The corresponding DTD would obviously be a lot more useful than the  
current DTD (which just describes a few collections and primitive  
types).  But this would obviously be a major and incompatible change  
to the file format, which we don't want to make without good reason.

We did made this leap in OmniOutliner 3, and we've found that it was  
definitely the right move in most respects for that application:   
many of our importers and exporters (such as the export to HTML) can  
now be easily written using XSLT.  But inventing a new format (rather  
than reusing Apple's property list format) means that it's actually  
harder for Cocoa applications to encode information such as formatted  
text into the new OmniOutliner 3 format (rather than simply writing  
RTF, which every Cocoa app can do), which is part of the reason why  
OmniGraffle still exports to the OmniOutliner 2 property list format  
rather than the newer XML-based format.

So, there are definitely up sides and down sides to making such a big  
change, and we haven't yet made up our minds as to whether it's the  
best move for OmniGraffle.

If you'd like to weigh in on whether you think encoding directly into  
XML would be a good or bad move, please send us your feedback--we'd  
love to hear from you!  (The best way to do send us that feedback is  
to select "Send Feedback" from the Help menu, although you're  
certainly also welcome to discuss the idea with each other here on  
the list.)

				Thanks,
				Ken




More information about the OmniGraffle-Users mailing list