OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only

Re: [office] Re: mimetype for ODF - Macintosh type codes?

  • 1.  Re: [office] Re: mimetype for ODF - Macintosh type codes?

    Posted 03-02-2006 16:33
     MHonArc v2.5.0b2 -->
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    office message

    [Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


    Subject: Re: [office] Re: mimetype for ODF - Macintosh type codes?


    On Thursday 02 March 2006 16:25, David A. Wheeler wrote:
    > the magic numbers of zip are not sufficient to distinguish the format from 
    > other zip files.
    
    That is not the case; we chose that the file named "mimetype" would be stored uncompressed
    and at a fixed offset in the ZIP, so that there _are_ magic numbers for OpenDocument files
    that use the ZIP storage.
    
    In file(1) syntax:
    0    string   PK\003\004
    >30  string   mimetype
    >>38 string   application/vnd.oasis.opendocument.text 
    >>38 string   application/vnd.oasis.opendocument.text-template
    etc.
    
    (which means the zip magic in the first 4 bytes, the litteral string "mimetype" at byte offset 30,
    and the actual mimetype at byte offset 38).
    
    Of course this doesn't apply to uncompressed (flat) XML files, which might need to be explained
    in the mimetype registration; I'm not sure if it allows for two variants of the same format,
    one in ZIP form and one in uncompressed XML form.  In any case the ZIP one is the main one,
    so I think we should describe the magic for it.
    
    James Bryce Clark wrote:
    > We noticed that you elect not to use the "+xml" form permitted by RFC 3023. 
    Yes, IMHO this makes sense for a format that is primarily ZIP based, and rarely uncompressed xml.
    
    -- 
    David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
    Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
    


    [Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]