[tei-council] numbered divs, a proposed solution
Syd Bauman
Syd_Bauman at Brown.edu
Mon Jan 8 18:48:35 EST 2007
> > But I am curious: does the above statement mean that you have
> > looked at the FAND ODDs I posted on the wiki and don't think they
> > are viable solutions?[1]
> >
> the ingenious hack #1 only works for DTDs.
Why do you say that? Both the .rng and .rnc files I get from roma are
valid, and seem to work exactly as expected (i.e., as the DTD does).
> I am considering implementing this directly in odd2dtd, so that
> when you have an empty class, a _DUMMY_ is inserted.
Seems like a route we may want to follow.
> But it puzzles me as to _why_ it works, since the content model
> _is_ ambiguous.
Again, what makes you say that? The content model for <body>, e.g.,
certainly looks deterministic to me.[1] Xerces J, xmllint, and
onsgmls all say the DTD is fine.
> And what about W3C schema.
I don't know, and haven't tested, although it seems unlikely that
what is deterministic in its Relax NG source would be converted into
something non-deterministic by trang.
> hack #2 is too complex. sorry. such a simple task has to be easier,
> in my book.
Allow me to play devil's advocate. First, I will argue that it's not
an at all difficult task. To remove numbered divs go to the sample
ODD, find the part that says "copy-and-paste this section", copy it,
paste it into your ODD, and you're done. Heck, there could even be a
little check-box on the Roma web interface that caused this
oh-so-common request to happen for you.
But more to the point, when did it become the TEI's goal to protect
users from schema code? While certainly not as nice as a class-system
change, this change is still easier than it was in P4.
Notes
-----
[1] It is as follows:
(
( %model.divWrapper; | %model.global; )*,
(
(
( %macro.component;, %model.global;*)+,
(
( divGen, %model.global;* )*,
(
( div, ( div | divGen | %model.global; )* )
|
( DO_NOT_USE_THIS, ( DO_NOT_USE_THIS | divGen | %model.global; )* )
|
( DO_NOT_USE_ME, ( DO_NOT_USE_ME | divGen | %model.global; )* )
)?
)
)
|
(
( divGen, %model.global;* )*,
(
( div, ( div | divGen | %model.global; )* )
|
( DO_NOT_USE_THIS, ( DO_NOT_USE_THIS | divGen | %model.global; )* )
|
( DO_NOT_USE_ME, ( DO_NOT_USE_ME | divGen | %model.global; )* )
)
)
),
%model.divWrapper.bottom;*
)
More information about the tei-council
mailing list