Formatting tables with missing cell
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Tue Aug 02, 2011 7:49 pm
Formatting tables with missing cell
Post by juergenpurtz »
How can I format a table where not all cells are present? I like to see column data according to the logic: <firstname> in first column and <familyname> in second column.
Example:
Example:
Code: Select all
<persons>
<person>
<name>
<firstname>Donald</firstname>
<familyname>Duck</familyname>
</name>
</person>
<person>
<name>
<familyname>Goofy</familyname>
</name>
</person>
</persons>
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Formatting tables with missing cell
Dear Juergen,
Sorry for the delay.
So the post relates to displaying a table in the Author page.
The Oxygen Author page is CSS driven but your XML structure is not quite compatible with a table structure. For a table you need an XML element which is the table (for example "persons"), an XML element which is a table row (for example "person") and you need child elements of the row to be the table cells. But in your case you would like the child elements of "name" to be table cells.
What you can do as a workaround would be to define each "person" as a table in the CSS, then each "name" as a row and its children as table cells like:
So you will have a bunch of tables, one on top of the other but the cells will have the same preferred width and thus it will look like a single table.
This entire XML structure will look like a single table (although it's not) as long as the content of each cell does not overflow the "200px" limit imposed in the CSS.
Regards,
Radu
Sorry for the delay.
So the post relates to displaying a table in the Author page.
The Oxygen Author page is CSS driven but your XML structure is not quite compatible with a table structure. For a table you need an XML element which is the table (for example "persons"), an XML element which is a table row (for example "person") and you need child elements of the row to be the table cells. But in your case you would like the child elements of "name" to be table cells.
What you can do as a workaround would be to define each "person" as a table in the CSS, then each "name" as a row and its children as table cells like:
Code: Select all
persons{
display:block;
}
person{
display:table;
}
name{
display:table-row;
}
firstname,
familyname{
display:table-cell;
/*Set a large width to the cells to make it look like a real table*/
/*But if the text content overflows the cell width then the structure will not behave like a real table*/
width:200px;
border: 1px solid black;
}
This entire XML structure will look like a single table (although it's not) as long as the content of each cell does not overflow the "200px" limit imposed in the CSS.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Tue Aug 02, 2011 7:49 pm
Re: Formatting tables with missing cell
Post by juergenpurtz »
Sorry, my example was unnecessary complicate. The <name> tags should be eliminated from the example. So we have table <persons> with rows of <person> and cells of <firstname> and <familyname>.
Code: Select all
<persons>
<person>
<firstname>Donald</firstname>
<familyname>Duck</familyname>
</person>
<person>
<familyname>Goofy</familyname>
</person>
</persons>
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Formatting tables with missing cell
Hi Juergen,
So you want that if the first cell is missing, the second cell in the row (in this case "familyname") to be presented on the second column.
This is not possible to specify from the CSS. So unfortunately I cannot give you a solution.
Regards,
Radu
So you want that if the first cell is missing, the second cell in the row (in this case "familyname") to be presented on the second column.
This is not possible to specify from the CSS. So unfortunately I cannot give you a solution.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Tue Aug 02, 2011 7:49 pm
Re: Formatting tables with missing cell
Post by juergenpurtz »
After one year is elapsed I like to ask, whether there is a new feature in the product which solve the problem of missing cells?
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Formatting tables with missing cell
Hi Juergen,
Sorry but no. And I do not think there is anything on our side which could be done to handle your situation.
Maybe you could add a restriction in the XML so that even if a first name is not available, the tag should appear with empty contents like:
Regards,
Radu
Sorry but no. And I do not think there is anything on our side which could be done to handle your situation.
Maybe you could add a restriction in the XML so that even if a first name is not available, the tag should appear with empty contents like:
Code: Select all
<firstname/>
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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