Marsoner Stephan wrote:
> Is ist possible to get a fixed table-layout in styled view even if some
> (cell-)elements in a (data-driven) xml-document are optional?
> 
> Example-data:
> 
> <table>
>   <row>
>     <a/>
>     <b/> /* optional */
>     <c/>
>   </row>
>   <row>
>     <a/>
>     <c/>
>   </row>
> </table>      
> 
> .. should always be rendered as a 3 column-table, with empty cells for
> optional elements, if they are missing.
> 

This should have worked.

---
root {
     display: block;
}

table {
     display: table;
     border: 1 solid gray;
}

row {
     display: table-row;
}

a,
b,
c {
     display: table-cell;
     content: paragraph(element-name());
     border: 1 solid gray;
     padding: 2px;
}

c {
     start-column: 3;
}
---

Unfortunately, the start-column extension property is not supported by 
our CSS parser. We'll fix this bug in next release.

For now, the best you can do is:

---
root {
     display: block;
}

table {
     display: table;
     border: 1 solid gray;
}

row {
     display: table-row;
}

a,
b,
c {
     display: table-cell;
     content: paragraph(element-name());
     border: 1 solid gray;
     padding: 2px;
}

c {
     column-span: 2;
     text-align: center;
}

b + c {
     column-span: 1;
     text-align: left;
}
---



-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.xml
Type: text/xml
Size: 184 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20041029/4d7dfe16/attachment.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.css
Type: text/css
Size: 345 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20041029/4d7dfe16/attachment.css
 

Reply via email to