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

List:       koffice-devel
Subject:    RE: KWord status
From:       "Gavin Thomas Nicol" <gtn () ebt ! com>
Date:       2001-02-11 23:42:32
[Download RAW message or body]

> 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

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

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