• Hi Guest: Welcome to TRIBE, the online home of TRIBE MAGAZINE. If you'd like to post here, or reply to existing posts on TRIBE, you first have to register. Join us!

xml and css

dj Red Turtle

TRIBE Promoter
Lets say I have this XML file.

<students>
<background/>
<student>
<firstName>John</firstName>
<lastName>Smith</lastName>
<studentNo>123456789</studentNo>
<semesterNo>1</semesterNo>
<courses>
<course1>abc123</course1>
<course2>def456</course2>
</courses>
</student>

I want to make a css that will make the courses i.e. course1 and course2 to be in a numbered list.

I tried

courses {
display:list-item;
list-style-type:decimal;
left:50px;
position:relative;
}

but it only numbers the first course as 0 and does not number anything else.
Please advise.
 

Liquidity

TRIBE Member
don't they all have to be the same? ie. <course id=1>abc123</course><course id=2>def456</course> etc.

course {
display:list-item;
list-style-type:decimal;
left:50px;
position:relative;
}
 

basilisk

TRIBE Member
I think you'd want to look into XSL... it gets a bit confusing these days when people talk about "stylesheets"...
 
Top