Print

Print


I asked this a while back but I think it slipped through the net,
as no-one replied (maybe it's insoluble :-)
 
1. Is it possible to add an attribute for an element via a %x....
   construction or similar, or does one have to perform surgery on the
   main DTD files? We need TYPE on several elements which don't have it.
 
2. I've been developing an OmniMark TEI-->HTML...despite sentiments
   expressed here, it is pretty good, and _very_ fast. However, its
   parser is gagging where others don't, and I don't understand why.
 
   Currently we say:
 
<!DOCTYPE TEI.2 SYSTEM "tei2.dtd" [
<!ENTITY % TEI.corpus.dtd    'INCLUDE'>
<!ENTITY % TEI.prose         'INCLUDE'>
<!ENTITY % TEI.verse         'INCLUDE' -- can we do this as well as prose? -->
<!ENTITY % TEI.transcr       'INCLUDE'>
<!ENTITY % TEI.textcrit      'INCLUDE'>
<!ENTITY % TEI.names.dates   'INCLUDE'>
<!ENTITY % TEI.linking       'INCLUDE'>
<!-- Standard character entities -->
<!ENTITY % ISOlat1 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN"-->
%ISOlat1;
<!ENTITY % ISOlat2 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN"-->
%ISOlat2;
<!ENTITY % ISOnum PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special
 Graphic//EN"-->
%ISOnum;
<!-- Local tagset mods -->
<!ENTITY % CURIA.entities system  'curia.ent'>
%CURIA.entities;
]>
 
The file curia.ent says a whole lot of character entities and renaming:
 
<!ENTITY fdot     SDATA "f" -- f (dot-over)-->
<!-- and a bunch of others -->
<!-- Renaming of elements according to MSMcQ -->
<!ENTITY % n.persName  'ps'>
<!-- a dozen or so similar omitted for brevity -->
<!ENTITY % n.orgName   'on' >
<!-- Modification to get round omission in TEI DTD, courtesy of LB -->
<!ENTITY % x.data '%n.persName | %n.placeName | %n.orgName |'>
 
Emacs psgml-mode likes all this and we edit away happily. RulesBuilder
likes it, and so A/E is also in use. But sgmls gripes when we parse a
file, but still goes ahead and parses to the end of the instance OK:
 
sgmls: SGML error at teihdr2.dtd, line 54 in declaration parameter 4:
       Content model is ambiguous
sgmls: SGML error at teihdr2.dtd, line 61 in declaration parameter 4:
       Content model is ambiguous
...lots more...
sgmls: SGML error at teihdr2.dtd, line 571 in declaration parameter 4:
       Content model is ambiguous
sgmls: SGML error at teicore2.dtd, line 9 in declaration parameter 4:
       Content model is ambiguous
...ditto...
sgmls: SGML error at teicore2.dtd, line 738 in declaration parameter 4:
       Content model is ambiguous
sgmls: SGML error at teistr2.dtd, line 170 in declaration parameter 4:
       Content model is ambiguous
...and for tran and nd2 as well.
 
But OmniMark gives the same `ambiguous' message and comes to a grinding
halt. I was under the impression that this message was to be expected
with the TEI, because of the nested complexities, and was in the nature
of a warning, not a fatal error.
 
I'm asking here first, but CCing this to Exoterica, as I don't know at
this stage if it's a TEI or OmniMark matter, and I hope to avoid any of
those "it's their code"/"it's their DTD" differences of opinion :-)
 
///Peter