Hi Brian,<div><br></div><div>Thank you for your reply. </div><div><br></div><div>I guess the issue is with the markup, or maybe I'm trying to do something that can't be expressed using tables?</div><div><br></div><div>
I have nested data and ideally I'd like the tables to be structured (and also show) this relationship. The data structure is the same regardless of how nested the node is. </div><div><br></div><div>This markup works...</div>
<div><br></div><div><div><table></div><div> <thead></div><div> <tr></div><div> <th>name</th><th>allowed cups</th><th>cups drunk</th></div><div> </tr></div><div>
</thead></div><div> <tbody></div><div> <!-- Top Containing Node(s) --></div><div> <tr></div><div> <th>Security</th><td>12</td><td>10</td></div><div> </tr></div>
<div> <!-- These are children of security --></div><div> <tr></div><div> <th>Chief</th><td>8</td><td>2</td></div><div> </tr></div><div> <tr></div><div> <th>Workers</th><td>4</td><td>8</td></div>
<div> </tr></div><div> <!-- And John could also have children too --></div><div> <tr></div><div> <th>John</th><td>2</td><td>4</td></div><div> </tr></div>
<div> <tr></div><div> <th>Terry</th><td>2</td><td>4</td></div><div> </tr></div><div><br></div><div></tbody></div><div></table></div><div><br></div><div>
But the structure doesn't represent the relationships in the data. <br><br>The reason behind wanting the code to represent the structure of the data, is so it can be sensibly wired up to some kind of UI for editing these grids, with changes cascading correctly.</div>
<div><br></div><div>Hope that makes a bit more sense! Thanks again! Laurie</div><br><div class="gmail_quote">On 15 April 2012 20:02, <span dir="ltr"><<a href="mailto:help-request@lists.whatwg.org">help-request@lists.whatwg.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Help mailing list submissions to<br>
<a href="mailto:help@lists.whatwg.org">help@lists.whatwg.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.whatwg.org/listinfo.cgi/help-whatwg.org" target="_blank">http://lists.whatwg.org/listinfo.cgi/help-whatwg.org</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:help-request@lists.whatwg.org">help-request@lists.whatwg.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:help-owner@lists.whatwg.org">help-owner@lists.whatwg.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Help digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Table Nesting (Laurence Gillian)<br>
2. Re: Table Nesting (Brian Tremblay)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 15 Apr 2012 15:27:37 +0100<br>
From: Laurence Gillian <<a href="mailto:lau@voodoodog.com">lau@voodoodog.com</a>><br>
To: <a href="mailto:help@lists.whatwg.org">help@lists.whatwg.org</a><br>
Subject: [html5] Table Nesting<br>
Message-ID:<br>
<<a href="mailto:CAEWRofcYy%2Bt-U0_WZdLWgZPjob7N8sLuzKnuDcPaGVzaZiBujQ@mail.gmail.com">CAEWRofcYy+t-U0_WZdLWgZPjob7N8sLuzKnuDcPaGVzaZiBujQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hello,<br>
<br>
I've been following WHATWG for the last few years, but normally I can<br>
figure out the problems! I've got a question with regards to nesting inside<br>
a table.<br>
The scenario is pulling data from a fairly complex XML document, where the<br>
data is nested. But let's pretend it's a bit simpler for this ;)<br>
<br>
E.g.<br>
<br>
Node<br>
-- Node<br>
-- Node<br>
-- Node<br>
-- Node<br>
<br>
Which in the real world is;<br>
<br>
Security Team A (a:allowed cups of tea = 18, b:cups of tea drunk = 14)<br>
-- Joe (8,2)<br>
-- Bob (8,8)<br>
-- John (2,4)<br>
<br>
The data is consistent between each node, as they use the same schema, and<br>
can be nested to any depth.<br>
<br>
Currently I can't see how to represent this relationship using the table<br>
specification?<br>
<br>
It's not possible to nest a tbody, inside a tbody, or say to use<br>
section/article tags to group the content as you might with say comments?<br>
<br>
Hope that makes some kind of sense! Laurie<br>
<br>
--<br>
Laurence Gillian<br>
<br>
VooDooDog<br>
20a Brownlow Mews,<br>
London, WC1N 2LA<br>
<br>
<a href="mailto:lau@voodoodog.com">lau@voodoodog.com</a><br>
<a href="http://www.voodoodog.com" target="_blank">www.voodoodog.com</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20120415/47db4e5a/attachment.html" target="_blank">http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20120415/47db4e5a/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 15 Apr 2012 11:44:02 -0700<br>
From: Brian Tremblay <<a href="mailto:webmaster@tsmchughs.com">webmaster@tsmchughs.com</a>><br>
To: <a href="mailto:help@lists.whatwg.org">help@lists.whatwg.org</a><br>
Subject: Re: [html5] Table Nesting<br>
Message-ID: <<a href="mailto:4F8B16F2.8070205@tsmchughs.com">4F8B16F2.8070205@tsmchughs.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 4/15/12 7:27 AM, Laurence Gillian wrote:<br>
><br>
> The scenario is pulling data from a fairly complex XML document,<br>
> where the data is nested.<br>
><br>
> Node<br>
> -- Node<br>
> -- Node<br>
> -- Node<br>
> -- Node<br>
><br>
> Which in the real world is;<br>
><br>
> Security Team A (a:allowed cups of tea = 18, b:cups of tea drunk = 14)<br>
> -- Joe (8,2)<br>
> -- Bob (8,8)<br>
> -- John (2,4)<br>
><br>
> I can't see how to represent this relationship using the table<br>
> specification?<br>
<br>
I must be missing something. It seems quite straightforward to me:<br>
<br>
<table><br>
<thead><br>
<tr><br>
<th>name</th><th>allowed cups</th><th>cups drunk</th><br>
</tr><br>
</thead><br>
<tbody><br>
<tr><br>
<th>Joe</th><td>8</td><td>2</td><br>
</tr><br>
<tr><br>
<th>Bob</th><td>8</td><td>8</td><br>
</tr><br>
<tr><br>
<th>John</th><td>2</td><td>4</td><br>
</tr><br>
</tbody><br>
</table><br>
<br>
<br>
> It's not possible to nest a tbody, inside a tbody, or say to use<br>
> section/article tags to group the content<br>
<br>
No, but why would you want to? I think you need to explain the problem a<br>
bit more. Is the problem with the markup? Or with traversing the xml dom<br>
of the data?<br>
<br>
--<br>
Brian Tremblay<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Help mailing list<br>
<a href="mailto:Help@lists.whatwg.org">Help@lists.whatwg.org</a><br>
<a href="http://lists.whatwg.org/listinfo.cgi/help-whatwg.org" target="_blank">http://lists.whatwg.org/listinfo.cgi/help-whatwg.org</a><br>
<br>
<br>
End of Help Digest, Vol 56, Issue 4<br>
***********************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:Arial,sans-serif;font-size:13px;border-collapse:collapse">Laurence Gillian <br><br>VooDooDog <br>20a Brownlow Mews, </span><div><span style="font-family:Arial,sans-serif;font-size:13px;border-collapse:collapse">London, WC1N 2LA</span></div>
<div><span style="font-family:Arial,sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div><span style="font-family:Arial,sans-serif;font-size:13px;border-collapse:collapse">+44 (0)7763 849 700<br>+44 (0)20 7387 2049 <br>
<br><span><a href="mailto:lau@voodoodog.com" style="color:rgb(42,93,176)" target="_blank">lau@voodoodog.com</a></span> <br><span><a href="http://www.voodoodog.com/" style="color:rgb(42,93,176)" target="_blank">www.voodoodog.com</a></span></span></div>
<br>
</div>