OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

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


Subject: Fwd: Re: Automatic-style naming




----------  Forwarded Message  ----------

Subject: Re: Automatic-style naming
Date: Friday 16 December 2005 01:07
From: Daniel Vogelheim <daniel@vogelheim.de>
To: David Faure <faure@kde.org>

Hi David,

>The OpenDocument specification doesn't seem to tell specifically whether it's allowed
>to have automatic styles with the same name (but different properties) in content.xml
>and in styles.xml.
>
>Someone sent me an OOo document where P1 and P2 were defined both in
>content.xml and styles.xml. Is this allowed?

I thought so, and it's certainly what the OOo implementation does. The
idea is that style-name attributes always refer to *their*
automatic-styles, in content.xml and styles.xml respectively.

The explanation is supposed to be in section 2.1.1, where it explains
the subdocument types and their content, noting that there contents
"[...] along with the automatic styles needed for [...]". Admittedly,
I could have written that more clearly. My apologies.

>If it is allowed, how does this work with flat xml? 
>I guess it's not allowed in flat xml, right?

The same, except that 'flat' XML only has a single file and a single
automatic-styles element, and hence all style-name attributes refer to
the one automatic-styles element.

Essentially, both cases could be considered to work alike if one uses
a suitable definition for *their* in the earlier paragraph.

>(which would mean that transforming a zip-based document to flat xml wouldn't be
>just a simple concatenation after all).

Yes. Which I personally find rather unfortunate, and would appreciate
if this was finally fixed.

A possible algorithm for going from zipped to flat file would be to
e.g. prefix all automatic-style names with a different letter for
styles.xml and content.xml, and to also and likewise prefix all style
references in the same files. Going from flat to zipped, one could
simply duplicate the automatic styles. The same applies to the
font-decls, which are similarly duplicated between styles and content.

The problem is, both methods are rather silly IMHO. The real problem
is that noone ever seems to be able to find this out on their own, and
hence there are probably a lot of wrong transformations between the
formats. But, again IMHO, if the format does specify two formats, it
should be very easy to convert between them. While the above isn't
exactly a killer, it's certainly an annoyance. 

>It seems to me that the specification could be clarified on this topic, since it's quite
>tempting to store all styles into a global name-based dictionary upon reading, but
>if the above is allowed then a single dictionary can't be used.

Confirmed, in both cases. :-)


Sincerely,
Daniel


P.S.: I'm an observer to the TC, but according to the current TC rules
observers may no longer post to the TC's mailing list; hence the
private mail. Fell free to forward this, if you think it helps
discussion.



-------------------------------------------------------

-- 
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]