Re: style => name?


Subject: Re: style => name?
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu Sep 06 2001 - 19:34:45 CDT


On Thu, 6 Sep 2001, John L. Clark wrote:

> Hey guys,
>
> I don't know if I just missed something along the way, but it appears
> that what used to be the "style" attribute to a given tag in an *.abw
> file has been replaced by the "name" attribute. To see this, simply
> write any abiword file using a recent build of abiword, including the
> most recently released version. If I missed the discussion of this
> change, could someone please post the link to the discussion? If not,
> why was this done? I don't understand the necessity, and I find it to
> be much more ambiguous when looking at the markup (what does <p
> name="Heading 1" ...></p> _mean_?). I would strongly object to this
> change. It also has broken the HTML exporter (any others?). I can
> easily fix the breakage to the exporter, but I hesitate to do so until I
> hear the justification for this change. I also just downloaded
> http://www.abisource.com/awml.dtd, and it says nothing about this:
>
> <!ELEMENT p (#PCDATA | c | field | image | cbr | pbr | br)*>
> <!ATTLIST p
> props CDATA #IMPLIED
> level (0|1|2|3|4|5|6|7|8|9|10 | CDATA) #IMPLIED
> style CDATA #IMPLIED
> listid CDATA #IMPLIED
> parentid CDATA #IMPLIED
> id ID #IMPLIED>
> <!-- p element contain text, images, fields or character
> spans. Level is used for lists, style for styles
> and props for formatting. listid and parentid are
> both used in lists. -->
>
> So none of our currently exported documents are valid xml. What
> gives?

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. 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".

The HTML exporter used "style" a lot. I hoped that I'd caught them all.
Clearly I did not.

I'm sorry I did not broadcast this more loudly but I believe I mention it
when I made the commit.

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.

In any case AbiWord was only exporting valid XML for about a month before
the DTD was out of date.

>
> John
> ... doesn't like changes to document structure without at least
> /some/ discussion

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.

Martin



This archive was generated by hypermail 2b25 : Thu Sep 06 2001 - 19:34:54 CDT