This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Mozilla XML > August 2005 > XForms repeat-item pseudoelement
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XForms repeat-item pseudoelement
|
|
| Brent DeMark 2005-08-15, 8:04 pm |
| 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.
My example is below:
<?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 {
display:table;
}
xf|repeat[repeat-item] {
display:table-row;
}
xf|repeat output {
display:table-cell;
}
*/
</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>
| |
| Aaron Reed 2005-08-17, 7:42 pm |
| 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
| |
| Allan Beaufour 2005-08-18, 7:54 pm |
| On Tuesday August 16 2005 00:24, 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.
As Aaron wrote, we do not support the pseudo-elements yet. For now, you can
style the repeat-items using "contextcontainer" element, fx:
contextcontainer {
border: 1px solid black;
}
will give the indivial repeat "rows" a black border.
--
Allan Beaufour
Novell Denmark
Novell® BrainShare® Barcelona 2005
11-15 September
The CCIB, Barcelona, Spain
www.novell.com/brainshare/europe
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|