Hi, 

I just stumbled over the following limitation:
"A block, marked as being collapsible, can be collapsed only if it 
contains other blocks."

I have the following XML structure, which I  want to display:

<metadata>
        <versions>
                <version_details v_id="1">
                        <info>
                        ...
                </version_details>
        </versions>
</metadata>


I have the following CSS definitions:

metadata:before { 
    content: paragraph(content(collapser(), "<", element-name(), ">"),
             font-weight, bold, color, white, background-color, gray); 
}

metadata {
    display: block;
    collapsible: yes;
    collapsed: yes;    
    not-collapsible-head: 1; /* title or metainfo */
    border: 1px solid gray;
    padding: 1px;
    margin: 8px 5px;
    background-color: white;
}

versions:before {
    content: paragraph(content("<", element-name(), ">"), 
    font-weight, bold, color, white, background-color, silver);    
    border: 1px solid gray;
}

versions {
    display: table;
    collapsible: yes;
    collapsed: yes;    
    not-collapsible-head: 1;
    border: 1px solid gray;
    padding: 10px;
}

versions > version_details {
    display: table-row;
}

version_details:before {
    display: table-row;
    color: navy;
    content: content("@", attr(v_id),":
[",xpath("count(//@*[.=current()/@v_id])-1"), "]", font-weight, bold);
} 

version_details > *:before {
    display: table-cell;
    color: navy;
    content: cell(content('<',element-name(),'>'));
    padding: 2px 5px 2px 2px;
}

version_details > * {
    display: table-cell;
    padding: 2px 5px 2px 2px;
}


Having this definition, I think I run in exactly this limitation, since
everytime when I click on the collapser, my parent element gets
collapsed.
I just can't define my versions element as block since I want an inline
presentation of my child elements.
Is there any kind of work-around for this situation?
Thank you very much for your help.

wbr,
Roman Huditsch

Reply via email to