title: XML to XSLT conversion
body: <p>Hi I have an xml document which has a list of families and a list of familyMembers and later Family to FamilyMember link. I have to create an XSL that displays a HTML table to contents 
  in the format
  Society<br/>
    1. Families<br/>
      1.1 FamilyA<br/>
        1.1.1 Member1 <br/>
        1.1.2 Member4 <br/>
      1.2 FamilyB<br/>
        1.2.1 Member2 <br/>
        1.2.2 Member3 <br/>
        1.2.3 Member5 <br/>
        1.2.4 Member6 <br/></p>
  
  <p>Clicking on the link should navigate to the corresponding portion of the page. Please help me to resolve this</p>
  
  <pre><code>         &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;society&gt;
          &lt;families&gt;
              &lt;family&gt;
                  &lt;name&gt;A&lt;/name&gt;
                  &lt;numberofMembers&gt;2&lt;/numberofMembers&gt;
                  &lt;Description&gt;abc&lt;/Description&gt;
                  &lt;place&gt;&lt;/place&gt;
              &lt;/family&gt;
              &lt;family&gt;
                  &lt;name&gt;B&lt;/name&gt;
                  &lt;numberofMembers&gt;4&lt;/numberofMembers&gt;
                  &lt;Description&gt;xyz&lt;/Description&gt;
                  &lt;place&gt;&lt;/place&gt;
              &lt;/family&gt;
          &lt;/families&gt;
          &lt;familyMembers&gt;
              &lt;familyMember&gt;
              &lt;name&gt;member1&lt;/name&gt;
              &lt;occupation&gt;blah&lt;/occupation&gt;
              &lt;ID&gt;1&lt;/ID&gt;
              &lt;/familyMember&gt;
              &lt;familyMember&gt;
                  &lt;name&gt;ghij&lt;/name&gt;
                  &lt;occupation&gt;blah2&lt;/occupation&gt;
                  &lt;ID&gt;2&lt;/ID&gt;
              &lt;/familyMember&gt;
              &lt;familyMember&gt;
                  &lt;name&gt;member2&lt;/name&gt;
                  &lt;occupation&gt;blah3&lt;/occupation&gt;
                  &lt;ID&gt;3&lt;/ID&gt;
              &lt;/familyMember&gt;
              &lt;familyMember&gt;
                  &lt;name&gt;member3&lt;/name&gt;
                  &lt;occupation&gt;bgd&lt;/occupation&gt;
                  &lt;ID&gt;4&lt;/ID&gt;
              &lt;/familyMember&gt;
              &lt;familyMember&gt;
                  &lt;name&gt;member4&lt;/name&gt;
                  &lt;occupation&gt;sdjhf&lt;/occupation&gt;
                  &lt;ID&gt;5&lt;/ID&gt;
              &lt;/familyMember&gt;
              &lt;familyMember&gt;
                  &lt;name&gt;member5&lt;/name&gt;
                  &lt;occupation&gt;member6&lt;/occupation&gt;
                  &lt;ID&gt;6&lt;/ID&gt;
              &lt;/familyMember&gt;
          &lt;/familyMembers&gt;
          &lt;FamilyFamilyMembers&gt;
              &lt;FamilyFamilyMember&gt;
                  &lt;source&gt;
                      /families/A
                  &lt;/source&gt;
                  &lt;target&gt;
                      /familyMember/member1
                  &lt;/target&gt;
              &lt;/FamilyFamilyMember&gt;
              &lt;FamilyFamilyMember&gt;
                  &lt;source&gt;
                      /families/A
                  &lt;/source&gt;
                  &lt;target&gt;
                      /familyMember/member4
                  &lt;/target&gt;
              &lt;/FamilyFamilyMember&gt;
              &lt;FamilyFamilyMember&gt;
                  &lt;source&gt;
                      /families/B
                  &lt;/source&gt;
                  &lt;target&gt;
                      /familyMember/member2
                  &lt;/target&gt;
              &lt;/FamilyFamilyMember&gt;
              &lt;FamilyFamilyMember&gt;
                  &lt;source&gt;
                      /families/B
                  &lt;/source&gt;
                  &lt;target&gt;
                      /familyMember/member3
                  &lt;/target&gt;
              &lt;/FamilyFamilyMember&gt;
              &lt;FamilyFamilyMember&gt;
                  &lt;source&gt;
                      /families/B
                  &lt;/source&gt;
                  &lt;target&gt;
                      /familyMember/member5
                  &lt;/target&gt;
              &lt;/FamilyFamilyMember&gt;
              &lt;FamilyFamilyMember&gt;
                  &lt;source&gt;
                      /families/A
                  &lt;/source&gt;
                  &lt;target&gt;
                      /familyMember/member6
                  &lt;/target&gt;
              &lt;/FamilyFamilyMember&gt;
          &lt;/FamilyFamilyMembers&gt;
      &lt;/society&gt;
  </code></pre>