🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.framemaker.sgml
4 messages
4 total messages Started by Michael_Hare Mon, 19 Jan 2009 21:06
Hard Carriage Returns on Paragraph and XML
#264
Author: Michael_Hare
Date: Mon, 19 Jan 2009 21:06
19 lines
1365 bytes
Hi,

I'm still running FM 7.2, I have 8.0, but we are not ready as a company to move yet.

I am capturing legacy FM information and need to save as XML.
This information will at times have paragraphs that used hard carriage returned to build in separation and make things easier to read.

When we export this XML, these hard CRs are removed and all extra white space is compressed out of the element.

This is causing much grief for the people reading the documents and they have asked if I can retain the hard breaks.

I've looked into the Structured Application and found nothing. I've looked at the ReadWrite Rules files in hopes I could map the hard break to a
or something like that. I'm not finding any solutions.

Is there a way to keep this information in the resulting XML file?

Thanks,

- mike
Re: Hard Carriage Returns on Paragraph and XML
#267
Author: Michael_Mueller-Hillebrand
Date: Tue, 20 Jan 2009 11:22
8 lines
1055 bytes
Mike,

there is a read/write rule instruction "preserve line breaks" to keep line breaks (Shift+Return) as line breaks in the XML. It is a little bit hard to parse this if you want to further process the documents and not very XML-stylish, because in most other places whitespace is not important.

I recommend including an empty element
with a formatting rule that creates a prefix or suffix of "\n".

- Michael M�ller-Hillebrand
Re: Hard Carriage Returns on Paragraph and XML
#272
Author: Michael_Hare
Date: Tue, 20 Jan 2009 21:07
1 lines
629 bytes
Thanks Michael.. I'll give that a try..
Re: Hard Carriage Returns on Paragraph and XML
#172
Author: systecgmbhnuremberg
Date: Mon, 02 Feb 2009 10:48
38 lines
2099 bytes
Hello Mr. Hare,

you might try the following:

1. Adjust the template of your structapp to contain a variable named "hardreturn" whose definition is "\n" (without the quotiation marks).

2. In your R/W-Rules, write: entity "hardreturn"is fm char 0x09;

3. In every FM-Document you want to save as XML
a. also add the variable
b. assign the structapp

4. ..and do the following
a. insert the variable "hardreturn" somewhere and copy it into the clipboard, and delete the variable from your insertion point
b. Search for "\p\p" (=two consecutive hard returns, i.e. an "empty line" or for "\x09" (= a soft return) and "change" "by pasting".
The result should be a variable "hardreturn, wherever \p\p or \x09 was.

If you save this as XML, the \x09 from the variable should survive as an entity.

Hope this helps.
With kind regards,
Franz.
| FINALLY: Adobe FrameMaker 9 and TCS 2 have arrived!
| Training, Software, Support, Plugins, Services
| Everything from one expert provider!
 <http://www.systec-gmbh.com/en/sites/toolbox.php>
 <http://www.systec-gmbh.com/en/sites/ditapack.php>
 <http://www.systec-gmbh.com/en/sites/3dpack.php>

| phone +49 911 99 89 55 - 600
| fax +49 911 99 89 55 - 663
| E-Mail info@systec-gmbh.com

| Schreiberhauer Str. 5, 90475 N�rnberg
| Internet www.systec-gmbh.com

| CEO Dipl.-Ing. (FH) Georg Eck, Dipl.-Btw. (FH) Manfred Papp
| Amtsgericht N�rnberg HRB 9369 Umsatzsteuer-Identifikationsnummer DE 133560519
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads