Page 1 of 1

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

Posted: Mon Aug 06, 2012 11:39 am
by sebastienlavandier
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.

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

Posted: Mon Aug 06, 2012 2:44 pm
by Radu
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

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

Posted: Thu Sep 20, 2012 9:49 am
by sebastienlavandier
Thanks for your answer Radu.
Regards
Sébastien.