mime types and vector graphics

Terry Hancock hancock at anansispaceworks.com
Wed Jul 30 01:59:45 EDT 2003


I need to store some data with a content specification like 
"major-type"/"minor-type", where the major-type needs to specify roughly 
the following types of data:  text, image, vector graphic, vector 3-D 
model, audio, etc., and each might be represented by a specific format as 
well, so I might have "image/gif"  or "vector/dxf" etc.

Well, that looks a lot like MIME content-types, but not quite.  In 
particular, MIME seems to have nothing to say about vector graphics (I 
guess they must be in the "application" type?).  But I'm not very 
well-informed about MIME, so I wonder if my information is up-to-date.  
How is SVG specified in MIME, for example?  I've seen "image/svg" and 
"image/svg+xml" and so on in a Google search, but one thing the web does 
poorly is tell you what the date was on the page you're reading! :-O

I think I would gain a lot by conforming to an internet standard like MIME, 
but I'm not sure how much effort it's going to cost me. ;-)

But I am doing a rather similar thing -- I need to be able to edit the 
data, adapting to the format, so I need to register 
"editor"/"viewer"/"filter" tools (I just call them "editor" but it's a 
broad definition) by specifying that they know what to do with the various 
types of data and that they can be used to "create", "edit", "quote", 
"markup", "view", "convert/check".

All of which is pretty much the same thing as what MIME is used for in 
email systems.

The QUESTION is:

When I want to add a vector type, such as DXF, for example, should I go 
with:

x-vector/dxf  (i.e. an extension spec inside my software)

or

application/dxf

or

image/dxf

(or maybe something weird along the lines of the svg+xml stuff I saw above, 
that looks frighteningly like adding a third layer in the MIME hierarchy). 

Anyway, I'm reaching a point of indecision about this. ;-)

I realize this isn't exactly a python-specific question, but I am actually 
doing this in Python (and Zope).

Any thoughts appreciated,
Terry

-- 
Terry Hancock
Anansi Spaceworks http://www.AnansiSpaceworks.com/





More information about the Python-list mailing list