[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [PATCH] cleaning up KWord's DTD
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2002-02-19 20:08:20
[Download RAW message or body]

On Tuesday 19 February 2002 15:24, David Faure wrote:
> On Sunday 17 February 2002 21:14, Nicolas Goutte wrote:
> > The attached patch is for the file kword/dtd/kword.dtd
> >
> > The patch is a first clean-up of KWord's DTD:
> > - fixing syntax errors
> > - fixing the DTD for files of KWord CVS HEAD
> > - trying not to break for KWord KOFFICE_1_1_BRANCH (I am quite sure that
> > I broke it nevertheless.)
> > - add other changes to the DTD (see <LAYOUT> and <STYLE> )
> > - fixing documentation/comment about the predefined XML entities
> > - adding a few TODO (questions, notes...) in the comments
>
> Looks good.
> Laurent, can you comment on the question about "what is
> VARIABLESETTINGS.displayLink" ? (and, is it required or optionnal, when
> loading ?)
>
> Can <FORMAT> really contain <TYPE>, <PGNUM>, <DATE> etc. ? I'm surprised.
> Isn't this inside of variables themselves ? Something must have changed,
> that I'm not aware of. This looks like a bug. It shouldn't be documented,
> it should be fixed... Huh. It looks like kword-1.1 was loading <VARIABLE>
> but never saving to it !?!?!?!? Actually, a comment in the code says that
> old documents had variable tags directly under <FORMAT>, which I found
> dirty, so I implemented loading of variables in a <VARIABLE> tag, and
> updated the DTD accordingly.
> Ok, the fix is simple then. I'll fix saving so that it uses a <VARIABLE>
> tag, kword-1.1 should be able to read it (I'll need testers ;).
> Please apply the rest of the DTD changes, but not that one.

Good, I will commit it with the new changes.

>
> > As there was many changes in the DTD, I think we should be honest and
> > raise to 3 the syntax version number of KWord CVS HEAD. I am pretty sure
> > that KWord 1.1.x cannot read correctly files from KWord CVS HEAD, so we
> > should better warn the user who is trying.
>
> No, the file format should still be compatible with 1.1. The above
> mixup isn't incompatible (the DTD was just in advance compared to the
> saving code), and there is no change that breaks the data format.

As the problem was <VARIABLE>, we can stay at syntax 2.

>
> > Syntax version 3 would also mean that we could clean up the DTD correctly
> > and we could perhaps fix a few oddities (like boolean: 0/1 or
> > true/false?)
>
> Hmm, do we mix up 0/1 and true/false ? Sounds plausible :}

Yes, for example <ITALIC> uses 0/1, while <LINEBREAKING> uses true/false

I have solved it for libexport by accepting both possibilities for booleans. 
May be KWord should also do it so we can change it for syntax 3.

Have a nice day/evening/night!

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic