Article View: comp.text.sgml
Article #54Significant white space
From: Terry Allen
Date: Fri, 24 Jul 1992 20:27
Date: Fri, 24 Jul 1992 20:27
47 lines
2177 bytes
2177 bytes
Dear News Group Readers:
I am a novice user of SGML engaged in a document translation
project for books on software. I am using a fairly well
developed DTD that gives me an element for displayed lines
of text, in which the line breaks and indentation are supposed
to be significant, call it <DISPLAY>.
My question to you is whether it is possible to indicate
leading blank spaces (and, secondarily, line breaks)
without the use of an entity. Given the text:
<DISPLAY>
some blanks there
none at start of this line.
</DISPLAY>
I would like to avoid creating an unreadable set of lines such as:
<DISPLAY>
␣␣␣␣␣some␣blanks␣there&linefeed;
none␣at␣start␣of␣this␣line.&linefeed;
</DISPLAY>
(␣ is an ISOpub entity; &linefeed; is concocted for the purpose.)
This is an approach I have seen used in two different SGML projects,
so I imagine that what I ask cannot be done, or cannot be done
conveniently. But I should like to understand why.
If I understand correctly, the blank space is a separator in
the Reference Concrete Syntax. Using another concrete syntax
would not appear to solve the problem throughout the
document. But is it possible to redefine the
separator locally (in the context of DISPLAY), perhaps as the
carriage return character, and make the blank space a shortref
to the ␣ entity? That wouldn't solve the smaller
problem of marking the line breaks, but it would avoid having
to transform the blank spaces and maintain readability in a file
that our editors may have to edit directly during production.
More interestingly, if not, why not?
I would greatly appreciate any helpful response. Responses
claiming that the blank space is not significant in this context
or that readability should not be a concern will not be
considered helpful.
Thanks.
Technical Details
Message-ID:
<Brwu5J.BKp@ora.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!world!ora.com!terryShow Full Headers
Complete Article Headers
Newsgroups: comp.text.sgml Path: arc1-ca.pugleaf.net!sparky!uunet!world!ora.com!terry From: terry@ora.com (Terry Allen) Subject: Significant white space Message-ID: <Brwu5J.BKp@ora.com> Organization: O'Reilly & Associates, Inc. Date: Fri, 24 Jul 1992 20:27:19 GMT Lines: 49