Inserted space when Format and Indent
Oxygen general issues.
-
- Posts: 83
- Joined: Fri Sep 17, 2004 10:53 am
- Location: Prague, the Czech Republic, Europe
Inserted space when Format and Indent
Hello!
I have following XHTML code:
When I run Format and Indent, I receive following code:
Why there are added these two spaces? Where can I switch these behavior? Between "<td>" and "The" are just 0D0A hexadecimal, as shown by XVI32 hexadecimal editor.
I am using oXygen 8.0 on JRE 1.5.0_06 on MS Windows 2000. Thank You in advance for Your answer.
Stepan
I have following XHTML code:
Code: Select all
<td>
The Office for the Counterparty:
</td>
Code: Select all
<td> The Office for the Counterparty: </td>
I am using oXygen 8.0 on JRE 1.5.0_06 on MS Windows 2000. Thank You in advance for Your answer.
Stepan
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
-
- Posts: 83
- Joined: Fri Sep 17, 2004 10:53 am
- Location: Prague, the Czech Republic, Europe
I expected this:
and NOT this:
Stepan
Code: Select all
<td>The Office for the Counterparty:</td>
Code: Select all
<td> The Office for the Counterparty: </td>
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Stepan,
That is not equivalent with the initial document that has whitespaces before and after the text. Imagine that you have b instead of td and the content is something like
which is rendered like
this is a bold word.
If after format and indent we loose the spaces and get something like
then you will end up rendering something like
this is aboldword.
Hope that helps,
Geprge
That is not equivalent with the initial document that has whitespaces before and after the text. Imagine that you have b instead of td and the content is something like
Code: Select all
<p>this is a<b>
bold
</b>word.</p>
this is a bold word.
If after format and indent we loose the spaces and get something like
Code: Select all
<p>this is a<b>bold</b>word.</p>
this is aboldword.
Hope that helps,
Geprge
George Cristian Bina
-
- Posts: 83
- Joined: Fri Sep 17, 2004 10:53 am
- Location: Prague, the Czech Republic, Europe
Hi George,
1) I guess, that Your (and my) initial document has no white space between "a" and "bold" or between "bold" and "word". Is new line white space? But OK - let us skip this point.
2) Your approach (adding space) should be used for inline elements, not other (block, table...) ones. oXygen also does not include space after <p> and before </p>. And <td> is also some kind of block element. Has oXygen this rule for different elements? If yes, table elements should be treated as block elements, otherwise, forget about it and do not add any new Java code into oXygen (and waste Your time).
Stepan
1) I guess, that Your (and my) initial document has no white space between "a" and "bold" or between "bold" and "word". Is new line white space? But OK - let us skip this point.
2) Your approach (adding space) should be used for inline elements, not other (block, table...) ones. oXygen also does not include space after <p> and before </p>. And <td> is also some kind of block element. Has oXygen this rule for different elements? If yes, table elements should be treated as block elements, otherwise, forget about it and do not add any new Java code into oXygen (and waste Your time).
Stepan
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
-
- Posts: 83
- Joined: Fri Sep 17, 2004 10:53 am
- Location: Prague, the Czech Republic, Europe
In http://www.w3.org/TR/html4/struct/text.htmlm chapter "9.1 White space" is written:
Is it not our case? StepanIn order to avoid problems with SGML line break rules and inconsistencies among extant implementations, authors should not rely on user agents to render white space immediately after a start tag or immediately before an end tag. Thus, authors, and in particular authoring tools, should write:
<P>We offer free <A>technical support</A> for subscribers.</P>
and not:
<P>We offer free<A> technical support </A>for subscribers.</P>
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
That's something related to SGML so I cannot comment on that. Anyway, it sounds like a recommendation to avoid white spaces after a start tag and before an end tag. I agree with that as a recommendation, but all this has no relevance to the format and indent action. We have already a document, if that document has whitespaces already as in your initial example then the format and indent action will not remove it, because as I explained in my example the content can be changed if that whitespace is removed. If you do not enter whitespace in the first place oXygen will not add it.
Best Regards,
George
Best Regards,
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service