Re: silly Syd, frustrated fool
[NOTE: I am posting this *for discussion after release*. Nothing here
affects the release, I don't think, and I don't want to get into a
lengthy discussion while I've got a lot to do and not a lot of time.]
So I've now spent quite a few hours (most 3 months ago, about an hour
this morning) fixing the code in the template for <dataRef> in
odds/teiodds.xsl that handles @minOccurs and @maxOccurs. At one point
it occurred to me that *no* value of @maxOccurs was being handled
properly. "How did this ever work?" I asked myself. A quick look
verified my fears: <dataRef> does not *have* a @minOccurs or
@maxOccurs.
So for now I'm just going to stop working on this (and leave it in
its improved -- but still not working -- state, with a comment
explaining). But I'm wondering if this vestigial code means at one
point we wanted @minOccurs and @maxOccurs on <dataRef>? And
furthermore, do we want <dataRef> to be a member of att.repeatable?
I *think* the answer is "no", because it would never be needed. For
simple multiple-vals-in-an-attr cases, the parent <datatype> can have
@minOccurs or @maxOccurs. For anything more complex (whether inside
<datatype> or <content>) <sequence> and <alternate> (which are
members of att.repeatable) could be used to control quantity. So I
think we don't need or want <dataRef> to have @minOccurs or
@maxOccurs. Thoughts?
The other frustratingly foolish thing I did recently while working on
@minOccurs and @maxOccurs I post here both to remind y'all of this
peril, and to amuse Lou who will at least chuckle. For Lou knows that
I can never spell "occurs" correctly. My fingers just want to add an
extra 'r'. Well, if you spell it wrong in a variable name, oXygen
complains immediately "I don't know the variable $maxOccurrs". But if
you spell it wrong in a reference to the attribute axis, oXygen does
not know better, and an XSLT processor will happily chug along and
test if @maxOccurrs is "unbounded". Since there is *never* a
@maxOccurrs, it is *never* "unbounded". Sigh.
I hope all you Americans had a Happy Thanksgiving!