/    Sign up×
Community /Pin to ProfileBookmark

Meaningfully marking up a tree-like knock-out diagram structure?

Ok. I’m starting the design phase of a tournament knock-out diagram page and for the life of me, I can’t think of a way to mark it up which would properly convey the data with its proper meaning and structure. Y’know, like starting with 16 people, 8 are kocked out and 8 go foward, then 4 are knocked out and 4 go foward and so on like the play-offs in the NHL.

Div’s would be pointless because they convey no meaning, lists (I suppose ) are half way there, but can’t convey that one thing is the child/result of two other elements ( you can have it the opposite way round, but that’s no good to me ) and as far as I can see, using anything else… is just plain wrong.

Any ideas folks?

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@ray326Dec 29.2004 — Sounds like a good opportunity to do an XML DTD and associated styling.
Copy linkTweet thisAlerts:
@Stephen_PhilbinauthorDec 29.2004 — Yeah I was thinking about XML. Trouble is though that I've barely touched on any real XML yet and it's for deployment over the web. As far as the rumours and possibilities go, it looks like XML on the web won't be a viable option until around 2007! :mad:
Copy linkTweet thisAlerts:
@NogDogDec 29.2004 — I have no problem with considering it tabular data and using a table, but you could do it as a list, too:
[code=php]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
<title>Tournament</title>
<style type="text/css">
li {
list-style-type: none;
width: 5em;
line-height: 1em;
text-decoration: underline;
}
.r2,.r3,.r4 {
position: relative;
}
.r2 {
top: -1.5em;
left: 4em;
}
.r3 {
top: -3em;
left: 4em;
}
.r4 {
top: -4.5em;
left: 4em;
}
table {
border-collapse: collapse;
border: solid thin black;
}
td,th {
width: 6em;
border: solid thin black;
padding: 3px;
vertical-align: middle;
}
</style>
</head>
<body>
<h1>8 Team Tournament</h1>
<h2>List Style</h2>
<ul>
<li>Team 1</li>
<li>Team 8
<ul>
<li class=r2>1 / 8</li>
</ul>
</li>
<li>Team 4</li>
<li>Team 5
<ul>
<li class=r2>4 / 5
<ul>
<li class=r3>1 / 4 / 5 / 8</li>
</ul>
</li>
</ul>
</li>
<li>Team 2</li>
<li>Team 7
<ul>
<li class=r2>2 / 7</li>
</ul>
</li>
<li>Team 3</li>
<li>Team 6
<ul>
<li class=r2>3 / 6
<ul>
<li class=r3>2 / 3 / 6 / 7
<ul>
<li class=r4>WINNER</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>Table Style</h2>
<table>
<tr><th>Round 1</th><th>Round 2</th><th>Round 3</th><th>Winner</th></tr>
<tr><td>Team 1</td><td rowspan=2>1 / 8</td><td rowspan=4>1/4/5/8</td><td rowspan=8>Winner</td></tr>
<tr><td>Team 8</td></tr>
<tr><td>Team 4</td><td rowspan=2>4 / 5</td></tr>
<tr><td>Team 5</td></tr>
<tr><td>Team 2</td><td rowspan=2>2 / 7</td><td rowspan=4>2/3/6/7</td></tr>
<tr><td>Team 7</td></tr>
<tr><td>Team 3</td><td rowspan=2>3 / 6</td></tr>
<tr><td>Team 6</td></tr>
</table>
</body>
</html>
[/code]
Copy linkTweet thisAlerts:
@MstrBobDec 29.2004 — If you're going to go with HTML, which probably makes the most sense considering the browsers currently in use, I think NogDog's table would make the most logical sense, and probably better represents the relationships than the list does, methinks.
Copy linkTweet thisAlerts:
@NogDogDec 29.2004 — [i]Originally posted by MstrBob [/i]

[B]If you're going to go with HTML, which probably makes the most sense considering the browsers currently in use, I think NogDog's table would make the most logical sense, and probably better represents the relationships than the list does, methinks. [/B][/QUOTE]

It was an interesting exercise trying to make it work with a <ul> list, though. ? Personally, I'd opt for the table solution.
Copy linkTweet thisAlerts:
@Stephen_PhilbinauthorDec 29.2004 — Yeah I haven't used tables in so long I forgot that I could manipulate the cells to represent the data like that. Although for the correct linearisation and readability I'm pretty sure the table should go vertically. Do you agree or am I being a bit wierd there?
Copy linkTweet thisAlerts:
@MstrBobDec 29.2004 — You're being a bit weird their. :p It's a standard part of HTML 4.01, and perfectly valid, since you are presenting data their. Audiobrowsers should be able to handle the rowspan and colpsan attributes. It might not get read exactly like you're looking for, but it is as close as you're probably going to get with HTML 4.
×

Success!

Help @Stephen_Philbin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...