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

List:       koffice-devel
Subject:    RE: KWord status
From:       Nicolas GOUTTE <nicog () snafu ! de>
Date:       2001-02-12 13:12:42
[Download RAW message or body]

Note: KWord is *not* a XML editor! It is a word-processor with additional 
capabilities (like a DTP modus!)
We were talking about external KWord's style sheets, not XSL. (Think more 
of CSS2, if you have not seen yet how KWord codes style sheets. (It is 
*not* CSS2!)
We also have to take in account what QT, KdeLibs and KdeBase give us as 
tools or we have to code it ourselves. And XSL is not coded (yet?)
And sorry, I do know XSL just as a term, I have never read the 
specification.

-----Original Message-----
From:	Gavin Thomas Nicol [SMTP:gtn@ebt.com]
Sent:	Monday, February 12, 2001 12:43 AM
To:	koffice-devel@max.tat.physik.uni-tuebingen.de
Subject:	RE: KWord status

> First, Thomas is right in that the tags are expected to remain
> stable over several (many?) versions of kword. However,we all
> know it is not perfect. That's why there is a syntaxVersion marker.

If the tag set is required to remain unchanged, I think this shows
a poor design... more than likely that the tags represent internal
data structures, or some form of procedural markup.

One advantage, perhaps the main one, of style vs. content separation
(external style sheets) is that the *real* interpretation of the
content (tags, attributes, and text) becomes a function of the
stylesheets themselves.

In such cases, you have some *generic* internal data structures
representing things like paragraphs, multicolumn layout blocks,
etc. When a document is read in, the mapping from tag name to
internal data structures is a function of the stylesheet being
used (the default being to map every tag to a paragraph or
somesuch). For example:

  <doc>                   -> document
  <chapter>               ->   div[gi="chapter"]
    <title>Title</title>       div[gi="title",content="Title"]
  </chapter>
  </doc>

This means that *any* tag set can be used, except that you need

  a) A stylesheet to convert from XML to internal structures
  b) A second stylesheet to convert internal structures to XML

A subset of XSL (a small subset... XSL is turing complete) would be
sufficient for both stylesheets.

At the UI level, you could expose this as a dialog allowing the
user to define a style:

    Define Style
        Tag Name:   [                   ]
        Style Name: [                   ]
        Para        ----select----
        Font        ----select----
        etc.

This would have the advantage of:

  a) Making KWord robust in the face of change
      - In order to bring in documents to take advantage of
        new internals, just change the stylesheets, not each
        instance.
  b) Making documents easier to publish to multiple media.

This level of XML authoring is also good enough for about 90%
of XML editing needs.

_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.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