Apache OpenOffice (AOO) Bugzilla – Issue 81588
dc:language in office:meta (meta.xml) killed
Last modified: 2009-07-20 14:53:45 UTC
OOO 2.3 deletes <dc:language></dc:language> in the office:meta element in the meta.xml file of older (<= 2.2.1) OOo documents. This element describes the language of the meta-data of the document (or I thought so). Is this now done differently? Is dc:language no longer necessary?
OOo never used that property, instead it used the language attribute from the default style. This is a redundancy in the file format and the language property is not necessary. So it might be possible that losing this unused property stayed unnoticed. As writing this property is not mandatory (according to the ODF spec) I think it is not even a bug that it is not present. But as it is perhaps used by others and now perhaps missed I think that we should fix that.
Thanks, Mathias.
Thinking about this I discovered a problem that until now wasn't revealed because - as I wrote - we never used that property. In fact an ODF document does not have *one* document language, it has *three* of them! The default style has a "western" language, an "asian" and a "CTL" language. Which language indeed is used depends on other things like the used font. So now I wonder which one would be the best choice for the dc:language. We shouldn't copy blindly what was used before 2.3 but check whether this makes sense.
IMHO dc:language shouldn't be any of the three languages. So the question remains: what exactly should dc:language express? What do users expect to get from it?
Perhaps we should allow users to specify this attribute directly in the properties dialog. If nothing is entered, no dc:language is written.
While looking whether a bug of deleting elements in meta.xml was already submitted I stumbled over this one. Perhaps it is not mandatory to write this element but when it is there it is mandatory to leave it. If I have read the spec correctly: In addition to this, conforming applications should preserve meta information and the content of styles. This means: The various <style:*-properties> elements (see section 15) may have arbitrary attributes attached and may have arbitrary element content. All attributes attached to these elements and elements contained within these elements should be preserved (see section 15.1.3); elements contained within the <office:meta> element may have arbitrary element content and should be preserved (see section 2.2.1). (section 1.5, page 36) Or do I see this wrongly ?
No, you are right. Preserving the attribute is recommended and we should do it. The question remains whether we should also use that property for new documents. So if the submitter agreed on just preserving existing attributes we can go on. If the request is to support it in all documents I still have to think about it. Just to give an outline, my current plan would be to take the locale of OOo to find out whether it is in the "western", "asian" or "CTL" group and then take the default language of this group as the document language. That should be correct for most cases. For the remaining cases where this is a wrong guess I think that we should provide means for changing that in the "document properties" dialog (as this is the one we are using for editing meta data).
Auto-detection of the installed locale of OOo sounds good. And - additionally - a new field in the "document properties" to change the "default language" (or whatever name it get) would be the best solution.
So I will split up the task. For 2.4 and in this issue I will make sure that a dc:language is preserved. In a follow-up task we will implement the new treatment but probably that won't be finished in the 2.4 time frame.
fixed in CWS mba24issues01
For testing take any document that contains a dc:language element in its meta.xml. Save it again, the document still should contain that element.
Verified in CWS mba24issues01.
Sorry for issue spam: is there an issue for the follow-up task for the possibility to change the document language in the "document properties" dialog?
This issue is closed automatically and wasn't rechecked in a current version of OOo. The fixed issue should be integrated in OOo since more than half a year. If you think this issue isn't fixed in a current version (OOo 3.1), please reopen it and change the field 'Target Milestone' accordingly. If you want to download a current version of OOo => http://download.openoffice.org/index.html If you want to know more about the handling of fixed/verified issues => http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues