> <hi rend=OurLogoType>Our Company's Name Goes Here</hi>
> However, if you run this through sgmls, it gives you the newline and
> blanks space between <docImprint> and <publisher>, and between
> <publisher> and <hi> as data.
Coincidentally, I ran into just this problem earlier this week (with a
different DTD). The problem is that if #PCDATA is legal content in
<docImprint> (and it is in P3), the RE (record end) and indentation is
content. SGML actually treats RE (record end) variously, and I'm afraid
you may have to check out Goldfarb (section 7.6.1--thanks, Syd!) if you
need all the messy and confusing details. Or for a less expensive
discussion than Goldfarb's, see Bryan, "SGML: An Author's Guide," p. 270
or van Herwijnen, 2nd edition, pp. 181-87.
In the present instance, the RE itself would be ignored if it were
followed immediately by the <publisher> start tag (Goldfarb, p. 322: "The
first RE in an element is ignored if no RS, data, or proper subelement
preceded it."), and it's the indentation that does you in. And the mixed
content model (elements plus #PCDATA) is also at fault; if <docImprint>
contained only element content (and no #PCDATA), RE, RS, and spaces would
all be suppressed by the parser.
I'm also afraid I can't offer an appealing solution within SGML. If you
don't need #PCDATA within your <docImprint>, you could take it out of the
content model, and your RE and spaces would be ignored. But I think that
your problem is more general than this example, and there will be
situations that require mixed content. Perhaps you might want to write a
postprocessing routine that massages your SGML source before it gets
passed to CoST. This isn't appealing, though, because it means that your
SGML source actually includes what is formatting information for your
input editor, where you really want it to include only markup and content.
Professor David J. Birnbaum [log in to unmask]
The Royal York Apartments, #802 http://www.pitt.edu/~djbpitt/
3955 Bigelow Boulevard voice: 1-412-624-5712
Pittsburgh, PA 15213 USA fax: 1-412-624-9714