I'd like to be able to show repeatable elements as a labeled,
comma-delimited list. For example, this xml:
<topicmeta>
<author>Author 1</author>
<author>Author 2</author>
<category>Category A</category>
<category>Category B</category>
<category>Category C</category>
</topicmeta>
should look like this:
author:
Author 1, Author 2
category:
Category A, Category B, Category C
I've been able to come close with this CSS code:
topicmeta > *:before {
display: inline;
content: ", ";
vertical-align: bottom;
}
topicmeta > * {
display: inline;
vertical-align: bottom;
}
topicmeta > *:first-of-type:before {
content: "";
}
topicmeta > *:first-of-type {
display: inline;
width: 20px;
content: division(
content(
paragraph(
content(
element-name(),
": "
),
font-weight, bold
),
xpath(".")
)
)
}
This gives me this output:
author: category:
Author 1, Author 2 Category A, Category B, Category C
But I'd like each element type to appear on the next line. I've tried
adding:
topicmeta > *:last-of-type {
display: inline-block;
padding-right: 500px;
}
and this can force the subsequent element to wrap, but not in any
orderly fashion. (width: 100% doesn't have any effect) Is there a way
to accomplish this?
Thanks!
Mark Fletcher
Workday(tm)
www.workday.com <http://www.workday.com/>
925-951-9053 (office)
mark.fletcher at workday.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20060420/26a64f52/attachment.htm