Re: Some of Word's fields


Subject: Re: Some of Word's fields
From: Paul Rohr (paul@abisource.com)
Date: Thu Jan 13 2000 - 14:14:48 CST


Justin,

This list is very, very helpful. Thanks! I think you've really confirmed
that we're on the right track here.

At 07:30 AM 1/13/00 -0600, Justin Bradford wrote:
>Anyway, many of these fields could fall under scripting, which AbiWord
>should support with an actual scripting language (rather than abusing the
>field concept). However, for the sake of Word compatibility, we might
>consider actually implementing them (or at least have a clear idea of how
>we might convert from/to fields and bits o' script). This
>Word/scripting/field thing is, of course, not an immediate concern.

Definitely. This sounds like a good TODO. Once we've isolated this set of
"scripting fields", we should at least write down how each could get
expressed in a scripting language, so that we know we haven't boxed
ourselves in. As you said, implementations can wait.

>So, most of these are simple. There are lots of formatting options,
>though. Basically all text and numbers have general formatting options,
>and many have some specific switches.

Bingo. It looks like we'll wind up with something like the following syntax:

  <field type= name= fmt= switches= >...</field>

The type argument will always be needed for any field, and the other common
arguments would have similar semantics for any field which used them (see #3
below), with perhaps a few more optional arguments (new=, id=, ref=) to be
determined later.

If so, then the next step would be to go through on a field-by-field basis
and XML-ify your list. Bingo. Instant spec document! :-)

First though, a few questions:

1. Dates
---------
What are the switches on the Date field, and why aren't they present on the
other fields? Are they just syntactic sugar (ie, is there a switch for Date
which makes it synonymous with, say, CreateDate?)

>CreateDate "[format]" - date doc was created
>Date "[format] [switches]" - today's date
>PrintDate "[format]" - date doc last printed
>SaveDate "[format]" - date doc last saved
>Time "[format]" - current time

2. New values
--------------
Will each of the following fields need a new= argument in our file format,
or does this just indicate that you can override the contents of the field
from the UI?

>Author "[newname]" - name of doc's author from Summary Info
>Comments "[newcomments]" - comments from Summary Info
>Info "infotype [newvalue]" - data from summary info
>Keywords "[newkeywords]" - keywords from summary info
>Subject "[newsubject]" - doc's subject from summary info
>Title "[newtitle]" - doc's title from summary info
>UserAddress "[newaddress]" - from user info
>UserInitials "[newinitials]" - from user info
>UserName "[newname]" - from user info

For example, which of the following is correct:

  <field type=Comments new="typed in by user">from summary info</field>

or just

  <field type=Comments>typed in by user</field>

I'm guessing the latter, but I wanted to confirm this. (If so, does there
need to be a switch to indicate that the content was overridden?)

3. Namespaces
--------------
From a quick scan, it looks like some field instances have names or
identifiers which allow them to be referenced by other fields (or, more
likely, by the scripting language). Is this correct?

If so, then we should be careful to avoid argument namespace collisions in
our file format. Our scripting implementation will be *much* cleaner if we
can always locate unique fields by referencing, say, the "name" (presumably
user-assigned) and/or "id" (presumably auto-generated) arguments of each
field.

>DocProperty "name" - value of a specific property from Summary Info
>ListNum "[name] [switches]" - inserts an element in a list
>Seq "identifier [bookmark] [switches]" - automatic sequence number
>Set "bookmark text" - assign new text to a bookmark
>Index and Tables
> RD, TA, TC, TOA, TOC, XE
>Links and References
> AutoText, AutoTextList, Hyperlink, IncludePicture, IncludeText, Link,
> NoteRef, PageRef, Quote, Ref, StyleRef

I haven't delved into the details of any of these fields, but I'm guessing
that not all instances of say "bookmark" or "name" here should share the
same argument name.

Paul



This archive was generated by hypermail 2b25 : Thu Jan 13 2000 - 14:09:30 CST