Problem w. Tables in Author Mode, CSS attrib white-space:pre
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Fri Mar 06, 2009 2:08 am
Problem w. Tables in Author Mode, CSS attrib white-space:pre
I reduced the problem to the following simple example, where a html table is simulated in XML. Using "white-space:pre" in the CSS-file is causing the problem:
==== XML-File Begin ======== XML-File END ====
==== Style Sheet file "Test.css" Begin ======== Style Sheef file "Test.css" End ====
Switching to author mode is working well now. But as soon as you remove the comment tags from "white-space:pre;", the table cannot be displayed any more in author mode and an error is shown.
In my (non-expert) opinion this is a bug. Thanks for any feedback!
==== XML-File Begin ====
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="Test.css" type="text/css"?>
<AA>
<BB>
<TABLE>
<TR>
<TD>
Some Cell Content
</TD>
<TD>
Other Cell Content
</TD>
</TR>
</TABLE>
</BB>
</AA>
==== Style Sheet file "Test.css" Begin ====
Code: Select all
BB { display:block; /* white-space:pre; */
border-style:solid; border-color:green; }
TABLE { display:table; border-style:inherit; }
TR { display:table-row; border-style:inherit; border-color:gray; }
TD { display:table-cell; border-style:inherit; border-color:inherit; }
Switching to author mode is working well now. But as soon as you remove the comment tags from "white-space:pre;", the table cannot be displayed any more in author mode and an error is shown.
In my (non-expert) opinion this is a bug. Thanks for any feedback!
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem w. Tables in Author Mode, CSS attrib white-space:pre
Hi,
Setting white-space:pre; on the BB means that all white spaces inside the element and its descendant elements (like TABLE, TR, TD) become significant and this means they have to be presented in order to be edited by the user.
This means it is no longer possible to render the table correctly as there is significant content between the table cells and table rows which needs to be somehow presented for editing.
Indeed a browser presents the XML as a table by ignoring some of the indentation between cells but as an editor we cannot behave in the same manner, so in order to present the content the table is broken.
The solution would be to use the white-space:pre; only for the cells content. If you still want to keep this preserve on BB then you have to override and set it to white-space:normal; for TABLE and then set them again to white-space:pre; for TD.
Regards,
Radu
Setting white-space:pre; on the BB means that all white spaces inside the element and its descendant elements (like TABLE, TR, TD) become significant and this means they have to be presented in order to be edited by the user.
This means it is no longer possible to render the table correctly as there is significant content between the table cells and table rows which needs to be somehow presented for editing.
Indeed a browser presents the XML as a table by ignoring some of the indentation between cells but as an editor we cannot behave in the same manner, so in order to present the content the table is broken.
The solution would be to use the white-space:pre; only for the cells content. If you still want to keep this preserve on BB then you have to override and set it to white-space:normal; for TABLE and then set them again to white-space:pre; for TD.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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