Okay, first, an apology.  Mea Culpa.  Mea Maxima Culpa.

I always seem to make this same mistake with XML:  I assume they
designed it to do more than it does.

I assumed that, given a DTD, an XML parser could tokenize the various
tag names.  It can't.  Mea Culpa.

I also assumed that, give a DTD, a SAX parser would validate as it
reads.  Well, it doesn't.  Mea Culpa.

I know that a SAX parser is event-driven.  I assumed, that it could be
driven by not only the type of element, but by the element name.  It
can't, at least, not unless you implement it to do so yourself.  Mea
Culpa.

And, as if my humiliation wasn't complete, it turns out that you *can*
restrict attribute values to a narrow, finite set.  Seems that, at the
one job where they restricted attribute use to "takes any value," it
was an in-house stylistic decision, not a semantic best-practice of
XML.


Mea Culpa.  Mea Maxima Culpa.


So, I have to backpedal ... majorly ... from most of what I said
before.  The only thing I have left is this:

1. Design a "skeleton DTD" using the existing parser as a model for
   the XML syntax.
2. Twiddle & fiddle with the skeleton.
   - Figure out what we want to make into an element, and what should
     be an attribute, and so on.
   - Figure out how to name stuff.
   - See if each new edit of the DTD points to internal structure
     changes that we could/should/must make.
3. Implement any LyX core changes pointed to by the DTD.


Mull it all over, guys.  I'm away until next Wednesday.  I'll read the
devel-list when I get back.

-- 
John Weiss

Reply via email to