I am afraid the <classSpec>
at.global.rendition is missing the vital attribute predeclare="true". I have committed the appropriate change to fix it.
This means that any ODD which redefines @rend, @rendition etc is going to fail when it comes to making a DTD. You may now formally curse the day DTDs were invented.
I might note that a few existing ODD users are going to be mighty confused when they find their code to change @rend globally simply fails to work these days. In retrospect, it would have been good to highlight this in the release notes.
I've written to Council to ask if we need a 2.8.1 release to fix this. Presumably we do. We should also put a test in place to catch this in future; I worked with the 2.8 codebase for months before the release using @rendition and never had a problem, but of course I wouldn't touch a DTD with a barge pole.
How would we catch this in a test?
I’d say so, annoying as it is. maybe it should be 2.9.0
:-}
you might like to test this, to check my logic
Sebastian Rahtz
Chief Data Architect
University of Oxford IT Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
Just testing this, it doesn't seem to cause a problem for me. First, create a simple ODD:
Generate a DTD, create a simple instance doc which uses @style, validate: all OK.
Then change the ODD to delete the @style:
Generate DTD, validate document again: @style is now not allowed. Delete @style and validate again: all good.
What am I missing?
Last edit: Martin Holmes 2015-04-14
ah. maybe this isn’t so bad. it breaks if you do the schemaSpec below, but you may argue that this is bad anyway.
<schemaSpec ident="myTEI">
<moduleRef key="tei"></moduleRef>
<moduleRef key="header"></moduleRef>
<moduleRef key="core"></moduleRef>
<moduleRef key="textstructure"></moduleRef>
<classRef key="att.global.analytic"/>
<classRef key="att.global.rendition"/>
<classSpec type="atts" ident="att.global.rendition" mode="change">
<attList>
<attDef ident="rendition" mode="change">
<valList mode="add" type="semi">
<valItem ident="a"/>
</valList>
</attDef>
</attList>
</classSpec>
</schemaSpec>
--
Sebastian Rahtz
Chief Data Architect
University of Oxford IT Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
You're right that in the case below, the valList is ignored:
DTD generates OK, file validates OK, @rendition is available. The only thing missing is the valList, so for instance Oxygen won't suggest "a" to you. This only affects DTDs.
This doesn't seem disastrous, but it does need fixing. Let me test again when I have a chance to update my Oxygen plugin to incorporate your changes.
eh? I get
foo.dtd:235: parser warning : PEReference: %att.global.rendition.attributes; not found
%att.global.attribute.xmlspace;’>
--
Sebastian Rahtz
Chief Data Architect
University of Oxford IT Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
Your update (rev 13206) doesn't seem to change anything in the test case; the generated DTD still doesn't reference the valList item at all.
So I think something different might be at work here.
Last edit: Martin Holmes 2015-04-14
My version of the ODD doesn't include your classRef elements; and I thought I didn't need to include classRef elements because the classSpecs come in automatically as part of the tei module?
yes. there’s things going on in here I don’t quite understand myself, and I can’t decide if my ODD is simply a mistake
or is uncovering a bug.
but its not as fatal as I implied.
Sebastian Rahtz
Chief Data Architect
University of Oxford IT Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
SR has already fixed this (even if it wasn't all that bad).