cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ADEPT & Whitespace

Highlighted
Newbie

ADEPT & Whitespace

Hi,

Does anybody know the exact rules that ADEPT follows when processing
whitespace characters?

We are assuming that all whitespace in 'element context' is removed, and
all whitespace inside PCDATA is turned into a single space. [Have we
assumed wrong?]

Thanks in advance,

Michael...........

Tags (2)
7 REPLIES 7
Highlighted

ADEPT & Whitespace

Michael Pomponio wrote:
>
> Does anybody know the exact rules that ADEPT follows when processing
> whitespace characters?
>
> We are assuming that all whitespace in 'element context' is removed, and
> all whitespace inside PCDATA is turned into a single space. [Have we
> assumed wrong?]

I think those assumptions may be partially wrong.

The definition of white space characters in a given application is dependent on
your SGML syntax. Nevertheless, you'll probably want to check out Goldfarb,
Charles, _The SGML Handbook_ for all the gory details on what constitutes white
space in reference concrete. Of particular interest is the RE (record end)
character, which can in some instances be treated as white space (but not in
others)--that in itself is a can of worms.

Cory Snavely
The Beacon Group
Highlighted

ADEPT & Whitespace

> From Michael Pomponio Mon May 11 06:39:14 1998
...[snip]
> Does anybody know the exact rules that ADEPT follows when processing
> whitespace characters?
>
> We are assuming that all whitespace in 'element context' is removed, and
> all whitespace inside PCDATA is turned into a single space. [Have we
> assumed wrong?]

I believe this is accurate, note that initial and ending WS is preserved
as one blank (where e.g. Netscape ignores all initial whitespace).

However, _all_ whitespace is preserved within elements that are declared
as "quadding=asis" in the FOSI, i.e. it is impossible to know how a
particular document willl be handled without taking the FOSI in account.
Tab-characters are replaced by spaces, even within "asis" text (at least
last time I tested, which was pre-7.0).

Regards,
Per-ÃÂ
ke
--
Per-ÃÂ
ke Ling (note: Per-Åke, transliteration Per-Ake)
email: Per-Ake.Ling@uab.ericsson.se phone: +46 8 727 5674
Ericsson Utvecklings AB mobile: +46 70 790 2446
AXE Research and Development fax: +46 8 727 3463
Highlighted

ADEPT & Whitespace

> From: "Cory Snavely"
...[snip]
> The definition of white space characters in a given application is dependent on
> your SGML syntax. Nevertheless, you'll probably want to check out Goldfarb,
> Charles, _The SGML Handbook_ for all the gory details on what constitutes white
> space in reference concrete. Of particular interest is the RE (record end)
> character, which can in some instances be treated as white space (but not in
> others)--that in itself is a can of worms.

Yes, but as far as I know Adept does follow these rules (although
I have some doubts in certain combinations of marked sections).

I believe the question was meant to ask what Adept does with the
remaining significant whitespaces when that the parser passes
to the Adept _application_. As the original poster noted all multiple
whitespaces are collapsed to one, except within elements defined as
"asis" in the FOSI.

To process the nsgmls output to mimic Adepts handling, replace all
occurrences of '(" "|"\\n")*' with ' ' within all lines starting with '-',
_except_ if the text is within an element declared as 'asis' in the FOSI.

PÃÂ

--
Per-ÃÂ
ke Ling (note: Per-Åke, transliteration Per-Ake)
email: Per-Ake.Ling@uab.ericsson.se phone: +46 8 727 5674
Ericsson Utvecklings AB mobile: +46 70 790 2446
AXE Research and Development fax: +46 8 727 3463
Highlighted

ADEPT & Whitespace

> From Michael Pomponio Mon May 11 06:39:14 1998
...[snip]
> We are assuming that all whitespace in 'element context' is removed, and
> all whitespace inside PCDATA is turned into a single space. [Have we
> assumed wrong?]

The behaviour I've witnessed with ADEPT (5.4.1 through V7) is that when you
are editting, you cannot enter multiple spaces in series in a PCDATA area
unless you are working in an element that the FOSI has defined to have
"as-is quadding". However, if your SGML data was created outside of ADEPT
and within the PCDATA areas there are places with multiple spaces in series,
ADEPT preserves them and does not collapse them into a single space.

Curtis Jones
Lucent Technologies
cjj@lucent.com
Highlighted

ADEPT & Whitespace

cjj@wrddo.wr.lucent.com said:
> The behaviour I've witnessed with ADEPT (5.4.1 through V7) is that when you
> are editting, you cannot enter multiple spaces in series in a PCDATA area
> unless you are working in an element that the FOSI has defined to have
> "as-is quadding". However, if your SGML data was created outside of ADEPT
> and within the PCDATA areas there are places with multiple spaces in series,
> ADEPT preserves them and does not collapse them into a single space.

True, but when you *compose*, the multiple spaces will be eliminated into a
single space unless the element is "asis".

Steve Cogorno Information Products Group
cogorno@sybase.com Sybase, Inc.
Highlighted

ADEPT & Whitespace

This is assuming that you are publishing with Adept Publisher and using a
FOSI. We publish to Infoaccess Guide and if we don't strip any unwanted
spaces before sending the SGML to Guide, they come through.

Lynn E. Hales
Information Systems Specialist
Newport News Shipbuilding
hales_le@nns.com
(757) 688-2949

----------
Highlighted

ADEPT & Whitespace

>From: "Hales, Lynn"
>
>This is assuming that you are publishing with Adept Publisher and using a
>FOSI. We publish to Infoaccess Guide and if we don't strip any unwanted
>spaces before sending the SGML to Guide, they come through.

I believe this also happens when compiling for DynaText v3.1.

-coryc

| Cory R. Carpenter | |
| Senior Tools Specialist | "It's sad when nerds turn feral." |
| Sequent Computer Systems, Inc. | -- 'Heard in the Halls' |
| Beaverton, OR, USA | SGML 96, Boston |
| coryc@sequent.com 503-578-5879 | |
Announcements