Re: Help Wanted: DSSSL Analyst

Subject: Re: Help Wanted: DSSSL Analyst
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Fri, 30 Apr 1999 19:11:47 -0400 (EDT)
[Brandon Ibach]
>    Perhaps I'm missing something here, but it occurs to me to ask,
> what exactly do you do when you find one of these situations (such
> as a list at the end of a paragraph)?
>    In other words, you can't just throw something out, you have to
> either manipulate it (in a preprocessing step) or handle it
> specially (in your DSSSL code).  What are you doing right now?

I'm converting the SGML to MIF.  Since Frame doesn't have a concept of
structure, everything becomes a series of paragraphs.

<para>...</para>

becomes

<Para 
 <PgfTag `Body'>
 <ParaLine 
  <String `...'>
 >
> # end of Para

A list with two items becomes two paragraphs of the appropriate types
for Frame to autonumber them.  But if a list is inside a paragraph, I
have to end the current paragraph, then start it again when the list
is over.  And since I'm data-driven, I was getting a blank paragraph
when the list was the last thing in the <para>:

<para>...<itemizedlist><listitem><para>...</></></>

became

<Para 
 <PgfTag `Body'>
 <ParaLine 
  <String `...'>
 >
> # end of Para
<Para 
 <PgfTag `ListBullet'>
 <ParaLine 
  <String `...'>
 >
> # end of Para
<Para 
 <PgfTag `Body'>
 <ParaLine 
  <String `'>
 >
> # end of Para

To avoid this, I have to check whether or not a sub-paragraph type
thing is the last thing (except for point events, which in Frame
includes tables and things that aren't tables but look like them to
Frame) in the paragraph.  Fun, huh?

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread