RE: SGML to RTF and back to SGML (supporting "formatting-instruction")

Subject: RE: SGML to RTF and back to SGML (supporting "formatting-instruction")
From: "John Sidlo" <jsidlo@xxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Oct 1998 10:53:26 -0400
We added the formattingInstruction to the RtfFOTBuilder.cxx (based on an
earlier message I've been unable to locate).

This requires 3 steps

1.  Somewhere in the declaration  class RtfFOTBuilder : public
SerialFOTBuilder {
add->
...
void formattingInstruction(const StringC&);
...

2.  In the same module define it as->
// Added based on message from DSSSL list
void RtfFOTBuilder::formattingInstruction(const StringC &s) {
	for (size_t i = 0; i < s.size(); i++) {
		if (char(s[i]) == '\\'
			&& i+1 < s.size()
			&& char(s[i+1]) == 'n')
		{
			os() << "\n";
			i++;
		}
		else
			os() << char(s[i]);
	}
	atomic();
}

3.  Finally, in your dsl add this->
;
; Extension function that directly outputs rtf or raw text
; Also supports "\n"
;
(declare-flow-object-class formatting-instruction
  "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")


> -----Original Message-----
> From: owner-dssslist@xxxxxxxxxxxxxxxx
> [mailto:owner-dssslist@xxxxxxxxxxxxxxxx]On Behalf Of Tom Anderson
> Sent: Thursday, October 08, 1998 6:40 PM
> To: DSSSL guru's (E-mail)
> Subject: SGML to RTF and back to SGML
>
>
> Hello,
>
> We are currently working on a project to output SGML -> MSWORD RTF using
> the JADE product.
>
> We are also building  MSWORD templates/macros so a person can enter form
> information then save as SGML and later parsed by JADE's NSGMLS program.
>
> Our client wants us to do a round trip SGML - RTF - SGML. MSWORD is to be
> used to edit the SGML files.
>
> So far the missing link is to get STYLE's into the JADE rtf files.
>
>
> We are trying to "HAMMER" rtf styles into JADE DSSSL created rtf.
>
> We got a tip from someone on how to possibly do this using the JADE DSSSL
>
> (make formatting-instruction
> 			data: "anything you want string")
>
> So far we have not been able to make this instruction to work.
>
> Attached is a segment of the DSSSL code.
>
> Why it no workie?
>
> (element gentitle
>     (make paragraph
>         lines:        'asis
>         space-before: 12pt
>         font-size:	  10pt
>         font-weight:  'bold
>         quadding:     'center
>        (make formatting-instruction
> 	data: "\s20\qc\nowidctlpar\intbl\adjustright")
>         (literal (case-fold-up (data (current-node))))
> 		(empty-sosofo)))
>
> Tom Anderson
>
> Director, Technical Services
>
> Lexi-tech International
>
>
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist
>


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


Current Thread