On 03/07/2011 05:17 PM, Philippe Nobili wrote:
>
> In order to improve our XXE plugin for our own signal processing XML
> dialect, we decided to style element attributes for a couple of selected
> elements.
>
> I order to do so, we added the following (small excerpt) code to our
> CSS stylesheet:
>
> geov|buf::attribute() ,
> geov|mainbuf::attribute() ,
> geov|value::attribute() {
>
> attribute-content-left: attribute-label() ":" ;
> attribute-content-middle: value-editor(attribute,attribute()) ;
> show-attribute: always;
>
> }
>
> This works fine, except that it does not display the optional attributes
> which have not been assigned a value; if we assign a value in the
> default attribute panel editor, then the attribute are rendered in the
> styled view as expected (but badly aligned due to an erroneous initial
> size reservation: we have to re-size the styled view).
>
> Is this the expected behavior of "show-attribute: always" setting ? or
> did we do something wrong ?
::attribute() customizes the contents of the attributes() panel.
Before customizing the attributes() panel, have you specified where and
how this panel is to be added? Example:
---
geov|buf::after,
geov|mainbuf:after,
geov|value:after {
display: block;
content: attributes();
}
---
I mean, it's difficult to answer your questions because the snippet you
have included in your email is incomplete:
---
geov|buf::attribute(),
geov|mainbuf::attribute(),
geov|value::attribute() {
attribute-content-left: attribute-label() ":" ;
attribute-content-middle: value-editor(attribute,attribute()) ;
show-attribute: always;
}
---
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support