Family tree in semantic HTML (Obsolete)

Johan007 on 11th February 2008 at 19:01

Having seen genesreunited.co.uk creating family tree in Flash I have come to the conclusion that it not possible to have Family tree in semantic HTML. Can ask everyone here for there ideas to do this and bare in mind genealogy can be quite complicated especially in many cultures in the past and some still today.

--
Johan De Silva / Web Designer | Read my movie reviews punk!

zcorpan on 11th February 2008 at 20:43

A table or nested lists?

--
Simon Pieters

Johan007 on 11th February 2008 at 22:21

There no way of linking two lists if say if ones parents where cousins (I need to be able to make this a possibility!)

--
Johan De Silva / Web Designer | Read my movie reviews punk!

zcorpan on 11th February 2008 at 23:00

I don't follow. Could you give an example?

--
Simon Pieters

Johan007 on 12th February 2008 at 09:37

I think I have gone badly ahead of myself and I need to go back to basics to show the complexities.

Example: Adam and Heather have a two children Jane and Peter. The next step is to map Heathers Family... (John is Adams brother).

<ul>
  <li>Adam Smith and Heather Smith 
    <ul>
      <li>Jane 
      <li>Peter
    </ul>
  </li>
 <li>John Smith
</ul>

--
Johan De Silva / Web Designer | Read my movie reviews punk!

James on 12th February 2008 at 11:30

I'm not sure this is possible with lists... Say you wanted to have a tree which shows an individual’s relationship to all of his or her great-great-great grandparents. To do that using lists, the individual would have to appear under all 'branches' - effectively appearing multiple times to be accurate. It would be like building a sitemap when you have a page that is duplicated many times across different sections - you end up having multiple instances of the same page because it belongs under multiple sections.

Also, in your example any effort to show Adam and John’s parents would also infer that they are Heather’s parents also, as she appears with Adam as a combined entity. In fact, she is from a different ’section' but is related to Adam in a different, non-hierarchical way.

--
Local gov web developer by day, web and accessibility blogger at lunchtime, freelancer by night.

dbloomfield on 12th February 2008 at 16:29

I think you would have to use nested lists to create different "views"

An overall view - The family as a whole

A relationship view. You could choose two people and then build a list showing how they are related

I would think the relationship view would require some nifty database work though

--
www.dbloomfield.org
www.satnav-store.co.uk
www.get4freenow.com

Cerbera (Moderator) on 15th February 2008 at 23:00

Family trees are typically written with rows of siblings. Their ancestors appear in rows above and their descendants in rows below. Sounds like an irregular data table.

If you transpose the tree, you get columns of siblings. Ancestors appear to the left and descendants appear to the right. Sounds like a nested list. (The clue is they are called family trees.)

Getting the presentation and layout you want may be challenging. The semantics should be possible in either approach. I haven't studied this in detail. Film at eleven.

--
Ben "Cerbera" Millard
Working as sdesign1’s front-end developer. Playing at Project Cerbera.

Johan007 on 26th November 2008 at 15:15

It seems to me that SVG 1.1 could be ideal for marking up family tree. I know very little about SVG accessibility and if there are any semantic meanings in the mark-up to make it worth while. I really want to choose a format that is future proof or I will have to use Flash. With Flash I would be able to create a slick zoom interface.

--
Johan De Silva / Web Designer | Read my movie reviews punk!

jordan on 28th November 2008 at 22:45

Johan, it’s actually possible to write an SVG/XHTML compound document… There’s even a W3C doctype for SVG+XHTML+MathML you can use.

I'm actually using it for a little project I'm working on; only problem is that IE doesn't support SVG one little bit! Sad

jordan on 13th December 2008 at 18:10

Just thinking about this one again: unless you have cousins marrying or such, inverting the family tree should make it possible to represent all of a person’s grandparents on both sides. In other words, the top level of the list would be the latest generation, with sublists representing a branch of ancestors.

Would that work? And if you have cousins marrying/branches crossing, I'm not sure how you'd represent that on an ordinary family tree (dotted lines come to mind), but I think you could legitimately add the partner’s name with a link to their actual position in the tree.

Edited to add example (excessive spacing due to code indention):

Cerbera (Moderator) on 13th December 2008 at 20:46

Each child has multiple parents. Nested <ul> has only one parent element for each child element. However, each parent element can have many child elements. As such, inverting the list gives the right relationships. Each child becomes a parent element, with that child’s parents being represented by child elements.

If each level of nesting is understood as being one generation, then your example could be done like this:

In this list, mothers have their children and descendants listed as child elements and descendent elements. Each mother’s partner is the immediately preceding sibling element.

However, if any member of this tree has brothers or sisters it gets fiddly in either representation. In your example, siblings only work if all their parents and ancestors are repeated for each sibling, afcait.

Rather than doing the whole thing as one list, you could treat each couple as being a separate list, with a heading element for each generation.

Grandparents

Parents

Child

--
Ben "Cerbera" Millard Working as sdesign1’s front-end developer. Playing at Project Cerbera.