Re: Version 0.9.0


Subject: Re: Version 0.9.0
From: sam th (sam@bur-jud-118-039.rh.uchicago.edu)
Date: Tue Apr 25 2000 - 19:36:54 CDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 25 Apr 2000, Justin Bradford wrote:

> > However, I think this exposes a weakness in the way we currently format
> > the field in the file format. I would prefer something along these lines:
> >
> > <field>
> > <outline-label level="2" format="numerical"/>
> > <c>1.</c>
> > </field>
>
> Why do you prefer that?

Here goes nothing . . .

There are essentially three options for this sort of formatting.

Option one - put the info in lots of places. This is seen in the list
implementation as published by Luke. It looks like this -

<p level="1" style="Capitalised List"><field type="list-label"/>
<c type="list-label"> This tests stuff</c></p>

here, we've put the list logic in the field, the <c> and the <p>.
Additionally, it creates totally unneccessary attributes (p/level, for
instance).

Option two - what I proposed in the first part of the email. It looks like
this.

<field type="list-label" level="1" style="Capitalized List">A</field>

All the logic is in the field tag, so this is an improvement over 1.
However, <field> has been given lots of extraneous attributes that only
make sense in the context of lists. In addition to being unclear, this is
likely to lead to namespace collision (for example, style="..." here means
something different than <p style="..."> ) The more fields we have, the
worse the namespace pollution gets. for example, this might be a page
number -

<field type="page-number" style="roman" starts-at="2"
show-even="false">17</field>

However, the following makes no sense -

<field type="page-number" level="3" starts-at="5">7</field>

There is no good way to specify these requirements in XML.

Option 3 - my proposed solution. looks like -

<field>
<list-label level="1" style="Capitalized List"/>
2
</field>

This has the following advantages

- - easy to specify in XML / easy validation

- - no namespace pollution

- - makes relationships clear

This advocay may just be the XML geek in me attempting to impose my
standards on everyone else, but I really think that it has advantages.

Just for reference, the *standard* XML solution would be -

<field>
<list-label level="1" style="Capitalized List">
2
</list-label>
</field>

I see no real advantage/disadvantage between this an my earlier solution.

           
                                     sam th
                                     sam@uchicago.edu
                                http://sam.rh.uchicago.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5Bjont+kM0Mq9M/wRArB3AKCU84wVRZEqTvvgVj5NJYI66HieEQCeOoDQ
YIM1T8lAuAb/LMVuELAvqAs=
=i9Yd
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2b25 : Tue Apr 25 2000 - 19:37:18 CDT