Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to control the force return in table cell data?

New Here ,
Jul 04, 2008 Jul 04, 2008
I have some xml format files.When I import them into FrameMaker,They display as table data.but when the data is very long in table cell,I want to control the new line by myself.for example,I add some \r\n in my xml file data,then in FrameMaker,It can identify the \r\n, force return.In framemaker I don't know the actual symbol that means the newline.How Can I deal with the problem?thank you!
TOPICS
Structured
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 04, 2008 Jul 04, 2008
zhaop,

The structure model within FrameMaker is designed to have paragraph-containing elements, each of which contains a single paragraph. In your case, it sounds like you are using the table cell as the paragraph-containing element which is OK, but doesn't work so well when you want multiple paragraphs in a cell. So, I think your best bet would be to add some additional elements as children to the table cell, each of which delimits an individual paragraph. For example, something like:

<cell>
<p>Here's a paragraph</p>
<p>Here's a paragraph</p>
<p>Here's a paragraph</p>
</cell>

You might be able to do it with linefeed and carriage returns somehow but I wouldn't recommend it. Using structural markup would be much more reliable.

Russ
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 04, 2008 Jul 04, 2008
thank you for your reply.I will receive your advice and try it on monday.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 04, 2008 Jul 04, 2008
thank you for your reply.I will try it with your advice on monday.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 04, 2008 Aug 04, 2008
This should be done in an XSLT - before importing into Frame - and not in your source XML file! (formatting does NOT belong in XML data).
David - www.mifmasters.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 05, 2008 Aug 05, 2008
David, true in some cases, but not valid as a blanket statement. XML metadata that passes to and from Frame must have certain pieces of information about formatting, otherwise Frame could not render it properly.

Russ
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2008 Aug 12, 2008
Hi Russ,
yes, but you have to agree that forcing a return in the SOURCE content is really not a wise thing to do - It would be better to break the content into multiple paragraphs or used an XSLT to determine the column width and insert your own breaks in a version of the XML for rendering in Frame. If, at a later date, your templates in Frame change to allow wider columns in your table, then you'd have to go back into the source code and change every occurrence of the c/r in the data - Yeuch! Better to transform the data once, before importing into Frame and then if the col-width changes it is a simple task to change the width in the XSLT - personally, I would make sure the EDD and DTD allows multi-lines in the table cell and then break-up the data to fit the table cell size in an XSLT before importing. Then you don't taint your source code...and it is quite easy to do this is an XSLT...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 12, 2008 Aug 12, 2008
LATEST
Yes, I do agree that line breaks are best handled exclusively by element boundaries, whether created by XSLT or otherwise. If that's what you are saying... I think I'm with you.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines