[tei-council] proposed re-org of div wrapping

Syd Bauman Syd_Bauman at Brown.edu
Thu Apr 19 15:09:23 EDT 2007


> Eh? Hang on! where did this postscript element come from? is there
> a sffr or trac item about it? 

IIRC, you were the one who said that while we can publish P5 1.0
without a letters & memos module, not having a method for encoding
postscripts would be an embarrassment.


> why do you think the content model of div is broken?

Because <head> and <opener> are allowed at the bottom where they
shouldn't be.


> > model.divTop = head opener salute epigraph
> > model.divBottom = closed signed trailer ps
> > model.divWrapper = argument byline dateline docAuthor docDate 
>
> this is not far from what we used to have, before (in Oxford) we
> decided to make divWrapper.bottom a subclass of divWrapper, and
> make divWrapper a combination of the old divTop and divBottom
> Why are you revisiting this issue?

You are correct, it is quite similar. I'm revisiting it because as
implemented bottom-in-Wrapper turns out not to work.[1] I wonder if
it wouldn't be better to use different names, though.
model.div.start, model.div.end?

BTW, the proposal I sketched out was to keep the three models
separate, but it might be cleaner to have only 2 classes that get
referenced from content models. I.e., instead of what I sketched out,
have

model.divTop = model.divWrapper head opener salute epigraph
model.divBottom = model.divWrapper closed signed trailer ps
model.divWrapper = argument byline dateline docAuthor docDate 

So rather than having thinks like

     ( model.divTop | model.divWrapper )*

in content models, you'd have only

      model.divTop*

Since I can't see any reason to want to refer to the top-only things
by themselves from within content, this may make more sense.


> divGen is supposed to behave just like a div, except that its
> content can be generated. If it's a div it has to be able to have
> divWrapper elements inside it. It's a convenience for the encoder
> if the divWrapper elements can be explicitly attached to the divGen
> rather than generated along with the content. I don't think it's
> anything to do with <index> particularly.

Hmmm ... I suppose I can see how it might be more convenient to have
some of the stuff surrounding the generated content in the source
XML. 

  <divGen type="stats">
    <head>Statistics</head>
  </divGen>

Although it's a little harder to see the case for <argument>,
<epigraph>, or <salute>, let's presume there is a case. But if so,
why not <closed>, <signed>, or <trailer>?

[Lots of train-of-thought that is unnecessary but some may find mildly
interesting moved from here to appendix.]

What is the difference, in P4, between <div> and <divGen>? Simple:
the former is *required* to have content, the latter is *required* to
be empty. (Oh, yeah, and they have different names :-) In the current
instantiation of P5, though, <div> is not required to have content
and <divGen> is permitted to have some (but not all). Why not just
ditch <divGen> entirely, and advise people to use 
  <div type="generatedIndex"/>
or whatever? Or perhaps we can add <div> to att.typed (taking type=
out of att.divLike), so that there's a subtype=:
  <div type="generated" subtype="index"/>

The semantics of the suggested value "generated" could be applied to
other elements as well. <ab> jumps to mind, but I chuckle when I
think what it means to see <lg type="generated" subtype="sonnet"> :-)

(I guess I could quite easily be convinced that type= is not the
right attribute here, but that there should be generated= of
data.truthValue.)

Note
----
[1] The system we currently have doesn't match what we decided in
    Oxford, I don't think; but it's not completely clear to me, and
    not important at this point.

Appendix
--------
There might well be other content that I'd prefer not to bother
auto-generating, too. E.g.

  <divGen type="stats">
    <head>Statistics</head>
    <p>The following table summarizes ...</p>
  </divGen>

But if we allow either the above *or* having both div-top-stuff and
then div-bottom-stuff, we need some mechanism for saying "put the
generated content here". E.g.

  <divGen type="stats">
    <head>Statistics</head>
    <p>The following table summarizes ...</p>
    <put-it-here/>
    <p>Any discrepancies in the table above ...</p>
  </divGen>

or

  <divGen type="FuncInd">
    <head>index of functions</head>
    <put-it-here/>
    <trailer>only functions written in ...</trailer>
  </divGen>

If we're going to have some mechanism for "put the generated content
here", why not call it <divGen>? E.g.:

  <div type="stats">
    <head>Statistics</head>
    <p>The following table summarizes ...</p>
    <divGen type="genStats"/>
    <p>Any discrepancies in the table above ...</p>
  </div>

or

  <div type="functionIndex">
    <head>index of functions</head>
    <divGen type="funcs"/>
    <trailer>only functions written in ...</trailer>
  </divGen>

The answer is, of course, because the statics example above is
neither valid nor in harmony with the semantics of divisions.

So perhaps there should be an <abGen>? 




More information about the tei-council mailing list