[tei-council] customization in P5

Syd Bauman Syd_Bauman at Brown.edu
Tue Dec 20 12:13:45 EST 2005


> I am not sure I get what the difference is? isnt every real life
> schema a customization?

No, every real life schema is the result of a customization. The
language the customization is made in and the language the schema is
expressed in can be different. E.g. In order to create a new content
model for <sourceDesc> I could write

  <content>
    <rng:oneOrMore>
      <rng:ref name="biblStruct"/>
    </rng:oneOrMore>
  </content>

i.e., RelaxNG, in my ODD customization file, and generate from it
DTD, XSD, or RNG. Or I might write

  <content>
     ( biblStruct+ )
  </content>

i.e., DTD, in my ODD customization file (yes, I know ODD does not
currently support this), and generate from it DTD, XSD, or RNG.

Or I might generate a customization in ODD (probably via Roma web
interface, but that's unimportant) that just does module selection,
generate DTDs from that, and then do something like
  <!ENTITY % sourceDesc "IGNORE">
  <!ELEMENT sourceDesc ( biblStruct+ )>
etc. in my extension files.

I am arguing that it is not worth supporting the writing of
customizations in other languages -- customizations should be written
in RelaxNG, preferably inside your ODD. The argument "but I know the
DTD language, not RelaxNG" just doesn't hold water for me. If you
know DTD, learning enough RelaxNG to mimic what you can do with a
DTD takes less than an hour.


> >I'm not sure what you mean by the RelaxNG parameterized schema
> >fragments,
> i mean what ends up in Schema/ when you do "make schemas". you've
> probably never used them....

I think I had used them at one point long ago, but even if I did, I
never knew what they were called :-)


> >but dropping the parameterization of the DTD fragments would be a
> >Good Thing. I think creating them has been a waste of your
> >valuable time, as will be maintaining them in the future.
> arguably. but the work is done now.

But maintenance is still a potential time drain, and one that not
only produces no discernable benefit that I can ascertain, arguably
it in fact has some moral drawbacks. DTDs are simply not as
expressive as even ODD-limited RelaxNG, and really should be avoided.
By permitting this sort of shenanigans, we are both enabling people
to not take the short amount of time needed to learn RelaxNG, and,
perhaps worse, allowing for potentially very complex situations to
arise when someone makes a DTD that is a flattened file based on DTD
extension files that are to be used in conjunction with a
Roma-generated DTD that itself has customizations (other than simple
module selection).


> and another point - *we* may not want to generate DTDs from ODD,
> but its one of the claims of the ODD system.

This discussion isn't about generating DTDs from ODD. (Although you
are correct, I'm not all that psyched about that, either.) It's about
using DTD as a customization language.


> The folks in the W3C using it *definitely* want (parameterized)
> DTDs!

Why do they want the result DTDs parameterized? Is Felix actually
writing DTD extensions to P5 Roma-generated DTDs?


> ... but look at most of the .xml files in Test in SF; they refer to
> the DTDs with a DOCTYPE, as in (eg)
>   <!DOCTYPE TEI SYSTEM "../DTD/tei.dtd" [
>     <!ENTITY % TEI.header "INCLUDE">
>     <!ENTITY % TEI.core "INCLUDE">
>     <!ENTITY % TEI.textstructure "INCLUDE">
>     ]>
>   <TEI xmlns="http://www.tei-c.org/ns/1.0">
> thats a customization, in my book. add in <!ENTITY % n.p "para"> if
> you want, and it'll work.

Yes, quite right. But what if I want to add an updated version of the
WWP extensions, which have over 590 declarations? Has anyone tested
something of that scale? I haven't. And I'm not eager to. When the
WWP moves to P5 it is possible (although unlikely) that we will still
want to use DTDs for awhile longer. But I'll certainly write the
customization in RelaxNG in ODD, generating DTDs iff need be.


But of course, we're not really discussing the right question, here,
which isn't "should ODDs permit DTD and XSD customization", but
rather the question (IIRC) Lou initially raised, which was "should ST
discuss" these issues. In my current anti-DTD state of mind, I would
say no, even if it can be done, it should be explained in a separate
HOWTO, not in the Guidelines themselves. But that may be silly, and
bears some thought.




More information about the tei-council mailing list