[osis-core] Element Review: <div>
Harry Plantinga
osis-core@bibletechnologieswg.org
Tue, 18 Jun 2002 11:30:28 -0400
I would like to second this comment -- I think the content
model should be changed to have the other stuff, followed
by optional nested <div>s. I consider this to be an
important change.
The proposed content model, with the nested <div>s as the last
elements in a <div>, is very commonly used in real texts,
as in Chris's example below. On the other hand, I can't think
of any situations where you'd really need to have a nested
div followed by some <p>s, a <divineName>, a <title>, etc.
Second, (and here's my ulterior motive,) if any nested <div>s
have to be last in a <div>, the content model is easier to
parse. You can parse it with start indicators only, no end
indicators needed. If end indicators are omitted, and you are
using the current content model, parsing problems arise in a
situation like this:
<div divTitle="Chapter 1">
<div divTitle="Section 1">
<p> some stuff here</p>
<p>I want this paragraph to be in Chapter 1 but not
in Section 1. How do I do it? I can't!
Why do we care about omit-endtag in XML, you ask? I'm glad you
asked. We care because we are hoping to edit these documents with
a non-XML application such as OpenOffice Writer. With the proposed
<div> content model, you can use the built-in Table of Contents
facility -- or paragraphs of style "div" -- to identify the
start of each div. With the current content model, you'd also
have to insert indicators for the the end of each div, which would
be less intuitive and more difficult.
-Harry
-----Original Message-----
From: owner-osis-core@bibletechnologieswg.org
[mailto:owner-osis-core@bibletechnologieswg.org]On Behalf Of Chris
Little
Sent: Monday, June 17, 2002 2:15 AM
To: osis-core@bibletechnologieswg.org
Subject: Re: [osis-core] Element Review: <div>
I'm frequently finding text portions that would best be marked as:
<div>
<title>Some title</title>
<div>
<title>sub-section 1 title</title>
some CDATA
</div>
<div>
<title>sub-section 2 title</title>
some CDATA
</div>
</div>
However, because all divs must precede any other element in a div, this
is illegal. I don't understand why this is the case and it seems like
div should just be added to the choice in div, and the sequence be removed.
--Chris
Patrick Durusau wrote:
> <div> has: <blockQuote>, <div>, <figure>, <lineGroup>, <list>,
> <milestone>, <p>, <q>, <seg>, <speech>, <title>, <verse>.
>
> Question: So we don't have phrase level markup in a <div>? That is how I
> see the content model for <div>, with things like <abbr>, <speaker> and
> <w> (to take only three examples) as always occurring in larger elements.
>
> Patrick
>