title: XSLT - How to create a table of words with the number of times they occur and sort them in order of decreasing frequency
body: <p>My XML file:</p>
  
  <pre><code>&lt;bncDoc xml:id="KS0"&gt;
      &lt;teiHeader&gt;
          &lt;fileDesc&gt;
              &lt;titleStmt&gt;
                  &lt;title&gt; Oxford City Council Health and Environmental Protection Committee meeting. Sample containing about 11223 words speech recorded in public context 
                  &lt;/title&gt;
                  &lt;respStmt&gt;
                      &lt;resp&gt; Data capture and transcription 
                      &lt;/resp&gt;
                      &lt;name&gt; Oxford University Press 
                      &lt;/name&gt;
                  &lt;/respStmt&gt;
              &lt;/titleStmt&gt;
              &lt;editionStmt&gt;
                  &lt;edition&gt;BNC XML Edition, December 2006
                  &lt;/edition&gt;
              &lt;/editionStmt&gt;
              &lt;extent&gt; 11223 tokens; 11688 w-units; 482 s-units 
              &lt;/extent&gt;
              &lt;publicationStmt&gt;
                  &lt;distributor&gt;Distributed under licence by Oxford University Computing Services on behalf of the BNC Consortium.
                  &lt;/distributor&gt;
                  &lt;availability&gt; This material is protected by international copyright laws and may not be copied or redistributed in any way. Consult the BNC Web Site at http://www.natcorp.ox.ac.uk for full licencing and distribution conditions.
                  &lt;/availability&gt;
                  &lt;idno type="bnc"&gt;KS0
                  &lt;/idno&gt;
                  &lt;idno type="old"&gt; OCCEnv 
                  &lt;/idno&gt;
              &lt;/publicationStmt&gt;
              &lt;sourceDesc&gt;
                  &lt;recordingStmt&gt;
                      &lt;recording n="139401" type="DAT"/&gt;
                  &lt;/recordingStmt&gt;
              &lt;/sourceDesc&gt;
          &lt;/fileDesc&gt;
          &lt;encodingDesc&gt;
              &lt;tagsDecl&gt;
                  &lt;namespace name=""&gt;
                      &lt;tagUsage gi="align" occurs="69"/&gt;
                      &lt;tagUsage gi="c" occurs="1408"/&gt;
                      &lt;tagUsage gi="div" occurs="1"/&gt;
                      &lt;tagUsage gi="event" occurs="3"/&gt;
                      &lt;tagUsage gi="mw" occurs="110"/&gt;
                      &lt;tagUsage gi="pause" occurs="2"/&gt;
                      &lt;tagUsage gi="s" occurs="482"/&gt;
                      &lt;tagUsage gi="u" occurs="192"/&gt;
                      &lt;tagUsage gi="unclear" occurs="65"/&gt;
                      &lt;tagUsage gi="vocal" occurs="7"/&gt;
                      &lt;tagUsage gi="w" occurs="11688"/&gt;
                  &lt;/namespace&gt;
              &lt;/tagsDecl&gt;
          &lt;/encodingDesc&gt;
          &lt;profileDesc&gt;
              &lt;creation date="0000"&gt;0000-00-00 Origination/creation date not known 
              &lt;/creation&gt;
              &lt;particDesc n="C872"&gt;
                  &lt;person ageGroup="X" xml:id="PS6H7" role="unspecified" sex="f" soc="AB" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;Chair
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6H8" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;g
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6H9" role="unspecified" sex="f" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;chair2
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HA" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;i
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HB" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;h
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HC" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;foe
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HD" role="unspecified" sex="f" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;b
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HE" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;a
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HF" role="unspecified" sex="f" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;ei
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HG" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;bp
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HH" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;c
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HJ" role="unspecified" sex="m" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;d
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HK" role="unspecified" sex="f" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;e
                      &lt;/persName&gt;
                  &lt;/person&gt;
                  &lt;person ageGroup="X" xml:id="PS6HL" role="unspecified" sex="u" soc="UU" dialect="NONE" educ="X"&gt;
                      &lt;persName&gt;d
                      &lt;/persName&gt;
                  &lt;/person&gt;
              &lt;/particDesc&gt;
              &lt;settingDesc&gt;
                  &lt;setting n="OCCEnv" who="PS6H7 PS6H8 PS6H9 PS6HA PS6HB PS6HC PS6HD PS6HE PS6HF PS6HG PS6HH PS6HJ PS6HK PS6HL"&gt;
                      &lt;placeName&gt;Oxfordshire:  Oxford 
                      &lt;/placeName&gt;
                      &lt;activity&gt; Council Committee Meeting 
                      &lt;/activity&gt;
                  &lt;/setting&gt;
              &lt;/settingDesc&gt;
              &lt;textClass&gt;
                  &lt;catRef targets="SPO ALLTIM3 ALLAVA0 ALLTYP2 SCGDOM3 SPOLOG2 SPOREG1"/&gt;
                  &lt;classCode scheme="DLEE"&gt;S meeting
                  &lt;/classCode&gt;
                  &lt;keywords&gt;
                      &lt;term&gt; (none) 
                      &lt;/term&gt;
                  &lt;/keywords&gt;
              &lt;/textClass&gt;
          &lt;/profileDesc&gt;
          &lt;revisionDesc&gt;
              &lt;change date="2006-10-21" who="#OUCS"&gt;Tag usage updated for BNC-XML
              &lt;/change&gt;
              &lt;change date="2000-12-13" who="#OUCS"&gt;Last check for BNC World first release
              &lt;/change&gt;
              &lt;change date="2000-09-06" who="#OUCS"&gt;Redo tagusage tables
              &lt;/change&gt;
              &lt;change date="2000-09-01" who="#OUCS"&gt;Check all tagcounts
              &lt;/change&gt;
              &lt;change date="2000-06-23" who="#OUCS"&gt;Resequenced s-units and added headers
              &lt;/change&gt;
              &lt;change date="2000-01-29" who="#OUCS"&gt;Revised participant details
              &lt;/change&gt;
              &lt;change date="2000-01-21" who="#OUCS"&gt;Added date info
              &lt;/change&gt;
              &lt;change date="2000-01-09" who="#OUCS"&gt;Updated all catrefs
              &lt;/change&gt;
              &lt;change date="2000-01-09" who="#OUCS"&gt;Updated REC elements to include tape number
              &lt;/change&gt;
              &lt;change date="2000-01-08" who="#OUCS"&gt;Updated titles
              &lt;/change&gt;
              &lt;change date="1999-12-25" who="#OUCS"&gt;corrected tagUsage
              &lt;/change&gt;
              &lt;change date="1999-09-21" who="#UCREL"&gt;POS codes revised for BNC-2; header updated
              &lt;/change&gt;
              &lt;change date="1994-11-27" who="#dominic"&gt;Initial accession to corpus
              &lt;/change&gt;
          &lt;/revisionDesc&gt;
      &lt;/teiHeader&gt;
      &lt;stext type="OTHERSP"&gt;
          &lt;div&gt;&lt;!--
  Oxford City Council: Health and Environmental Protection Committee (Nuclear Issues and Pollution Control) Sub-Committee.
  Wednesday, 18th April 1990, 2.30pm, Town Hall.--&gt;&lt;u who="PS6H7"&gt;
                  &lt;s n="3"&gt;
                      &lt;w c5="AV0" hw="well" pos="ADV"&gt;Well
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="AJ0" hw="good" pos="ADJ"&gt;good 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="afternoon" pos="SUBST"&gt;afternoon
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="PNI" hw="everybody" pos="PRON"&gt;everybody
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="PNP" hw="i" pos="PRON"&gt;I 
                      &lt;/w&gt;
                      &lt;w c5="VVB" hw="think" pos="VERB"&gt;think 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;we
                      &lt;/w&gt;
                      &lt;w c5="VHD" hw="have" pos="VERB"&gt;'d 
                      &lt;/w&gt;
                      &lt;w c5="AV0" hw="well" pos="ADV"&gt;better 
                      &lt;/w&gt;
                      &lt;w c5="VVI" hw="get" pos="VERB"&gt;get 
                      &lt;/w&gt;
                      &lt;w c5="VVN" hw="start" pos="VERB"&gt;started
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;.
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="4"&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;We 
                      &lt;/w&gt;
                      &lt;w c5="VVD" hw="look" pos="VERB"&gt;looked 
                      &lt;/w&gt;
                      &lt;w c5="AV0" hw="so" pos="ADV"&gt;so 
                      &lt;/w&gt;
                      &lt;w c5="AJ0" hw="thin" pos="ADJ"&gt;thin 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="on" pos="PREP"&gt;on 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;the 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="ground" pos="SUBST"&gt;ground
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="PNP" hw="i" pos="PRON"&gt;I 
                      &lt;/w&gt;
                      &lt;w c5="VVD" hw="think" pos="VERB"&gt;thought 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;we
                      &lt;/w&gt;
                      &lt;w c5="VM0" hw="would" pos="VERB"&gt;'d 
                      &lt;/w&gt;
                      &lt;w c5="VVI" hw="sit" pos="VERB"&gt;sit 
                      &lt;/w&gt;
                      &lt;w c5="CJC" hw="and" pos="CONJ"&gt;and 
                      &lt;/w&gt;
                      &lt;w c5="VVI" hw="wait" pos="VERB"&gt;wait 
                      &lt;/w&gt;
                      &lt;w c5="CJC" hw="and" pos="CONJ"&gt;and 
                      &lt;/w&gt;
                      &lt;w c5="VVI" hw="see" pos="VERB"&gt;see 
                      &lt;/w&gt;
                      &lt;w c5="CJS" hw="if" pos="CONJ"&gt;if 
                      &lt;/w&gt;
                      &lt;w c5="PNI" hw="everyone" pos="PRON"&gt;everyone
                      &lt;/w&gt;
                      &lt;w c5="VBZ" hw="be" pos="VERB"&gt;'s 
                      &lt;/w&gt;
                      &lt;w c5="VVG-AJ0" hw="come" pos="VERB"&gt;coming
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="CJC" hw="but" pos="CONJ"&gt;but 
                      &lt;/w&gt;
                      &lt;w c5="UNC" hw="erm" pos="UNC"&gt;erm 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;we
                      &lt;/w&gt;
                      &lt;w c5="VM0" hw="will" pos="VERB"&gt;'ll 
                      &lt;/w&gt;
                      &lt;w c5="VHI" hw="have" pos="VERB"&gt;have 
                      &lt;/w&gt;
                      &lt;w c5="TO0" hw="to" pos="PREP"&gt;to 
                      &lt;/w&gt;
                      &lt;w c5="VVI" hw="get" pos="VERB"&gt;get 
                      &lt;/w&gt;
                      &lt;w c5="VVN" hw="start" pos="VERB"&gt;started 
                      &lt;/w&gt;
                      &lt;w c5="AV0" hw="anyway" pos="ADV"&gt;anyway
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;.
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="5"&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;We
                      &lt;/w&gt;
                      &lt;w c5="VM0" hw="will" pos="VERB"&gt;'ll 
                      &lt;/w&gt;
                      &lt;w c5="VVI" hw="welcome" pos="VERB"&gt;welcome
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;we 
                      &lt;/w&gt;
                      &lt;w c5="VHB" hw="have" pos="VERB"&gt;have 
                      &lt;/w&gt;
                      &lt;w c5="CRD" hw="two" pos="ADJ"&gt;two 
                      &lt;/w&gt;
                      &lt;w c5="NN2" hw="speaker" pos="SUBST"&gt;speakers
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="NP0" hw="mr" pos="SUBST"&gt;Mr 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="bob" pos="SUBST"&gt;Bob 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="plumtree" pos="SUBST"&gt;Plumtree
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="CJC" hw="and" pos="CONJ"&gt;and 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="ms" pos="SUBST"&gt;Ms 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="erica" pos="SUBST"&gt;Erica 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="ison" pos="SUBST"&gt;Ison
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;.
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="6"&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;We 
                      &lt;/w&gt;
                      &lt;w c5="VVD" hw="ask" pos="VERB"&gt;asked 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="they" pos="PRON"&gt;them 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="to" pos="PREP"&gt;to 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;the 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="meeting" pos="SUBST"&gt;meeting 
                      &lt;/w&gt;
                      &lt;w c5="CJC" hw="and" pos="CONJ"&gt;and 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="we" pos="PRON"&gt;we 
                      &lt;/w&gt;
                      &lt;w c5="VVB" hw="look" pos="VERB"&gt;look 
                      &lt;/w&gt;
                      &lt;w c5="AV0" hw="forward" pos="ADV"&gt;forward 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="to" pos="PREP"&gt;to 
                      &lt;/w&gt;
                      &lt;w c5="VVG-NN1" hw="listen" pos="VERB"&gt;listening 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="to" pos="PREP"&gt;to 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="you" pos="PRON"&gt;you 
                      &lt;/w&gt;
                      &lt;w c5="AV0" hw="later" pos="ADV"&gt;later 
                      &lt;/w&gt;
                      &lt;w c5="AVP" hw="on" pos="ADV"&gt;on 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="in" pos="PREP"&gt;in 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;the 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="agenda" pos="SUBST"&gt;agenda
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;.
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="7"&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;The 
                      &lt;/w&gt;
                      &lt;w c5="NN2" hw="minute" pos="SUBST"&gt;minutes 
                      &lt;/w&gt;
                      &lt;w c5="PRF" hw="of" pos="PREP"&gt;of 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;the 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="meeting" pos="SUBST"&gt;meeting 
                      &lt;/w&gt;
                      &lt;w c5="VVD-VVN" hw="hold" pos="VERB"&gt;held 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="in" pos="PREP"&gt;in 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="january" pos="SUBST"&gt;January
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;.
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="8"&gt;
                      &lt;w c5="DT0" hw="any" pos="ADJ"&gt;Any 
                      &lt;/w&gt;
                      &lt;w c5="NN2" hw="correction" pos="SUBST"&gt;corrections 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="to" pos="PREP"&gt;to 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;the 
                      &lt;/w&gt;
                      &lt;w c5="NN2" hw="minute" pos="SUBST"&gt;minutes 
                      &lt;/w&gt;
                      &lt;w c5="ORD" hw="first" pos="ADJ"&gt;first
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;?
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="9"&gt;
                      &lt;w c5="NN1-VVB" hw="page" pos="SUBST"&gt;Page 
                      &lt;/w&gt;
                      &lt;w c5="CRD" hw="1" pos="ADJ"&gt;1
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;?
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="483"&gt;
                      &lt;w c5="EX0" hw="there" pos="PRON"&gt;There 
                      &lt;/w&gt;
                      &lt;w c5="VBZ" hw="be" pos="VERB"&gt;is 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="a" pos="ART"&gt;a 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="school" pos="SUBST"&gt;school 
                      &lt;/w&gt;
                      &lt;w c5="PRP" hw="in" pos="PREP"&gt;in 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="ferry" pos="SUBST"&gt;Ferry 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="hinksey" pos="SUBST"&gt;Hinksey 
                      &lt;/w&gt;
                      &lt;w c5="NP0" hw="road" pos="SUBST"&gt;Road 
                      &lt;/w&gt;
                      &lt;w c5="VBZ" hw="be" pos="VERB"&gt;is
                      &lt;/w&gt;
                      &lt;w c5="XX0" hw="not" pos="ADV"&gt;n't 
                      &lt;/w&gt;
                      &lt;w c5="EX0" hw="there" pos="PRON"&gt;there
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="AT0" hw="a" pos="ART"&gt;a 
                      &lt;/w&gt;
                      &lt;w c5="AJ0" hw="middle" pos="ADJ"&gt;middle 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="school" pos="SUBST"&gt;school 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="i" pos="PRON"&gt;I 
                      &lt;/w&gt;
                      &lt;w c5="VVB" hw="think" pos="VERB"&gt;think
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;, 
                      &lt;/c&gt;
                      &lt;w c5="AV0" hw="so" pos="ADV"&gt;so 
                      &lt;/w&gt;
                      &lt;w c5="DT0" hw="that" pos="ADJ"&gt;that
                      &lt;/w&gt;
                      &lt;w c5="VBZ" hw="be" pos="VERB"&gt;'s 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;the 
                      &lt;/w&gt;
                      &lt;w c5="AJ0" hw="only" pos="ADJ"&gt;only 
                      &lt;/w&gt;
                      &lt;w c5="PNI" hw="one" pos="PRON"&gt;one 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="i" pos="PRON"&gt;I 
                      &lt;/w&gt;
                      &lt;w c5="VVB" hw="know" pos="VERB"&gt;know
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;.
                      &lt;/c&gt;
                  &lt;/s&gt;
                  &lt;s n="484"&gt;
                      &lt;w c5="AT0" hw="the" pos="ART"&gt;The 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="thing" pos="SUBST"&gt;thing 
                      &lt;/w&gt;
                      &lt;w c5="PNP" hw="i" pos="PRON"&gt;I
                      &lt;/w&gt;
                      &lt;w c5="VM0" hw="would" pos="VERB"&gt;'d 
                      &lt;/w&gt;
                      &lt;w c5="AV0" hw="really" pos="ADV"&gt;really 
                      &lt;/w&gt;
                      &lt;w c5="VVI" hw="like" pos="VERB"&gt;like 
                      &lt;/w&gt;
                      &lt;w c5="VBZ" hw="be" pos="VERB"&gt;is 
                      &lt;/w&gt;
                      &lt;w c5="AT0" hw="a" pos="ART"&gt;a 
                      &lt;/w&gt;
                      &lt;w c5="NN1" hw="glossary" pos="SUBST"&gt;glossary 
                      &lt;/w&gt;
                      &lt;w c5="PRF" hw="of" pos="PREP"&gt;of 
                      &lt;/w&gt;
                      &lt;w c5="NN2" hw="term" pos="SUBST"&gt;terms
                      &lt;/w&gt;
                      &lt;c c5="PUN"&gt;.
                      &lt;/c&gt;
                  &lt;/s&gt;
              &lt;/u&gt;
          &lt;/div&gt;
      &lt;/stext&gt;
  &lt;/bncDoc&gt;
  </code></pre>
  
  <p>How do I create a table of words with the number of times they occur and sort them in order of decreasing frequency?</p>