How can I represent an xml element with some attributes (id, name, ...) in a table with a css file ?

<oXygen/> general issues.
sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

How can I represent an xml element with some attributes (id, name, ...) in a table with a css file ?

Post by sebastienlavandier » Mon Aug 06, 2012 11:39 am

Hello,

I have already represent a xml element in a table with a css file (table, table-row, table-cell, ...).
It works well !

But now, I meet a problem with an other xml element which is composed by many attributes (Id, name, refs, ...) and I can't build a table to represent this.

Example :
<hotspot id="fig-0001-gra-0001-hot-0000" applicationStructureIdent="hot000" applicationStructureName="0" hotspotType="CALLOUT" hotspotTitle="BICYCLE" objectDescr="BICYCLE"/>

hotspot {
display: table-row;
padding: 0.3em;
border: 1px solid gray;
vertical-align: top;
text-align: center;
}*/

hotspot[id] {
display: table-cell;
padding: 0.3em;
border: 1px solid gray;
vertical-align: top;
text-align: center;

content:attr(id);
}

hotspot[applicationStructureIdent] {
display: table-cell;
padding: 0.3em;
border: 1px solid gray;
vertical-align: top;
text-align: center;

content:attr(applicationStructureIdents);
}

I want represent this element in a Row, where each attribute is a cell. How can I do that ? Maybe Author Oxygen proposes a solution for this typically xml problem ?

Do you have some ideas ?
Thanks in advance for your answer.

Radu
Posts: 6706
Joined: Fri Jul 09, 2004 5:18 pm

Re: How can I represent an xml element with some attributes (id, name, ...) in a table with a css file ?

Post by Radu » Mon Aug 06, 2012 2:44 pm

Hello Sebastien,

Sorry but you cannot visually create table cells from an element's attributes.

In the next Oxygen version (14.1) you will at least be able to edit attributes in-place using usual controls like combo boxes or text fields so at least this will maybe prove useful for editing attributes.
For example you will be able to specify something in the CSS like:

Code: Select all

hotspot{
content: "ID: " oxy_editor(type, combo, edit, "@id", colums, 20)
" Ident: " oxy_editor(type, combo, edit, "@applicationStructureIdent", colums, 20)
" Name: " oxy_editor(type, combo, edit, "@applicationStructureName", colums, 20)
" Title: " oxy_editor(type, combo, edit, "@hotspotTitle", colums, 20)
" Descr: " oxy_editor(type, combo, edit, "@objectDescr", colums, 20);
}
As you see you will also be able to specify the number of characters which should fit in the combo box, thus these values will appear aligned as if they would be present in a table.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: How can I represent an xml element with some attributes (id, name, ...) in a table with a css file ?

Post by sebastienlavandier » Thu Sep 20, 2012 9:49 am

Thanks for your answer Radu.
Regards
Sébastien.

Post Reply