0
Hard Carriage Returns on Paragraph and XML
New Here
,
/t5/framemaker-discussions/hard-carriage-returns-on-paragraph-and-xml/td-p/1247225
Jan 19, 2009
Jan 19, 2009
Copy link to clipboard
Copied
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 returns 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 element of some kind, 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
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 returns 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 element of some kind, 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
TOPICS
Structured
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Contributor
,
/t5/framemaker-discussions/hard-carriage-returns-on-paragraph-and-xml/m-p/1247226#M5146
Jan 20, 2009
Jan 20, 2009
Copy link to clipboard
Copied
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
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
mphare1156
AUTHOR
New Here
,
/t5/framemaker-discussions/hard-carriage-returns-on-paragraph-and-xml/m-p/1247227#M5147
Jan 20, 2009
Jan 20, 2009
Copy link to clipboard
Copied
Thanks Michael.. I'll give that a try..
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
LATEST
/t5/framemaker-discussions/hard-carriage-returns-on-paragraph-and-xml/m-p/1247228#M5148
Feb 02, 2009
Feb 02, 2009
Copy link to clipboard
Copied
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.
[ excess signature removed by host ]
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.
[ excess signature removed by host ]
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

