Re: XForms repeat-item pseudoelement
Aaron Reed <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Brent DeMark wrote:
> Is the repeat-item supported yet as an attribute yet in css. I'm trying
> to style a repeat as a table, but can't seem to make it happen, and any
> styling on the repeat-item doesn't show up.
>
Hey Brent,
None of the pseudo elements are supported yet, and probably won't be for
the next release of Firefox. To support them will require some large
core changes that no one really felt ready to make, yet. Here is your
sample code laying out the way that you wanted it to.
Note: no need to really style repeat as table since it is a div in the
anonymous content so will display: block; as it is. If you would like
control of each repeating block, you could wrapper it in a group and
style that as a table-row. but again, not really necessary since a
group is also display: block;
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<style>
@namespace xf url(http://www.w3.org/2002/xforms);
/*
xf|repeat div {
display: table;
}
*/
xf|repeat xf|output span{
display: table-cell;
width: 110px;
}
</style>
<xf:model>
<xf:instance>
<attachments xmlns="">
<attachment>
<name>filename1 longer</name><format>zip</format>
</attachment>
<attachment>
<name>filename2</name><format>doc</format>
</attachment>
</attachments>
</xf:instance>
</xf:model>
</head>
<body>
What I want it to look like
<table>
<tr><td>filename 1 longer</td><td>zip</td></tr>
<tr><td>filename 2</td><td>doc</td></tr>
</table>
<br/>
<xf:repeat nodeset="attachment">
<xf:output ref="name"/>
<xf:output ref="format"/>
</xf:repeat>
</body>
</html>
Let me know if you have any more questions,
--Aaron