Re: style => name?


Subject: Re: style => name?
From: Paul Rohr (paul@abisource.com)
Date: Sat Sep 08 2001 - 14:32:14 CDT


At 10:34 AM 9/7/01 +1000, Martin Sevior wrote:
>OK, I cleaned this up. For some reason that I don't understand, sometimes
>abi was using the attribute "name" to repesent a style and sometimes it
>was using "style" to repesent a style.

Sorry. I thought the original implementation was pretty easy to understand.
There are two ways styles are used in a document:

1. All style *references* take the form of a STYLE= attribute on a P or C
tag. The semantics are that you're applying a paragraph or character-level
style with that name (as appropriate) to the current scope.

2. All style *definitions* are S tags inside the STYLES block at the head
of the document, where the two immediately relevant attributes tell you what
the NAME= of that style is and what TYPE= of style it is (P for paragraph or
C for character).

The net effect is styles allow a named indirection to augment the explicit
PROPS on a C or P tag with a canned, document-wide set of PROPS hanging off
an S tag with the appropriate NAME and TYPE.

For example, look at the markup for the following document:

  abi/test/wp/Styles.abw

If there are any other questions about the original styles design, by all
means ask. :-)

>I unified everything to make it all
>name at the same time I made built-in styles edittable. I chose
>"name" rather name "style" because "name" was being written out into
>the styles headers of our *.abw documents. When I made the change I put
>in lots of code to support "legacy" documents with "style".

Now that I've explained, would you mind reverting to the original file
format? Using a NAME= attribute on paragraphs to indicate which style is
being used is non-intuitive, and having all that compatibility code to
maintain sounds bug-prone.

>That DTD is badly out of date because I've been adding stuff to our file
>format for about the last year without changing the DTD. I don't know
>about DTD's anyway. At one stage Sam TH asked me some question in the hope
>of updating it but unfortunately I did not answer him.

Yep. Unfortunately, that DTD was out of date soon after Sam wrote it
because none of the active developers knows enough about DTDs to keep it in
sync.

>My appologies. We did need to clean up the "name" and "style" issue and
>choose one or the other. I chose "name" becaase it broke the code and
>existing documents less.

As explained above, I guess I don't understand why we'd need to choose one
or the other, since reverting to the original behavior should work just
fine.

Or am I missing something here?

Paul



This archive was generated by hypermail 2b25 : Sat Sep 08 2001 - 14:27:42 CDT