Skip to main content
Known Participant
July 14, 2011
Question

Has DIVELEMENT always created a line break?

  • July 14, 2011
  • 1 reply
  • 591 views

Just wondering if the DIVELEMENT always renders a line break after the ending </div> tag.  That is not what HTML does so I'm just wondering if its a bug or the way DIVELEMENT is supposed to render.  I can't find it documented anywhere so I thought I would run it by folks on the forum.

Here is an example:

<TextFlow xmlns="http://ns.adobe.com/textLayout/2008" version="2.0.0" locale="en">
<div>Concept topic Number 1</div><div>This is some dummy content for flex that has topic type of: concept.</div><div>Note:    This is dummy content, so nothing here is going to be really thought provoking or, shall we say, deep.</div></TextFlow>

and it renders like this, where the div's are seperated by line breaks:

Concept topic Number 1
This is some dummy content for flex that has topic type of: concept.
Note:    This is DAVID's dummy content, so nothing here is going to be really thought provoking or, shall we say, deep.

Thanks!!

This topic has been closed for replies.

1 reply

Adobe Employee
July 15, 2011

<div>Concept topic Number 1</div> means <div><p><span>Concept topic Number 1</span></p></div>, which is by design.

There must be more than one pragraph in div, more than one span in paragraph , span's parent must be a paragraph... ...There are many rules in TLF. Normalization process will create required elements for the users to obey all the rules.

Adobe Employee
July 18, 2011

Some div-converting examples

<div>Concept topic Number 1</div>     ->    <div><p><span>Concept topic Number  1</span></p></div>

<div></div>     ->    <div><p><span></span></p></div>

<div><p><span>Concept topic Number  1</span></p><p><span>Concept topic Number  1</span></p></div>

->      <div><p><span>Concept topic Number  1</span></p><p><span>Concept topic Number  1</span></p></div>

Yes, the specification should be more detailed. For your XSD schema, <div>Concept topic Number 1</div> should also be treated as legal because TLF has normaliztion prcess in my opnion.