(: OBSOLETED! date: 08-Jun-2010 author: Gary Lewis note: This program was replaced by verify_nces_des2009_table265_2000_and_later.xq :) (: file: verify_nces_doe2009_table265_recent.xq date: 27-May-2010 author: Gary Lewis purpose: Used to verify the counts of degree-granting institutions for "recent" years in Table 265 of the NCES Digest of Education Statistics, 2009. The meaning of "recent" remains undetermined at this time. It depends on when the meaning of variables used in the program change as we go back in time. These variables are: unitid, fips, sector, iclevel, control, deggrant, and pset4flg. Table 265 prior to 1995-96 refers to higher education institutions rather than degree-granting institutions, so for certain this program will not be useful for data prior to 1995-96. Verifying published table values is an important way to ensure that we're using the same definitions that NCES used. Table 265 is located at: http://nces.ed.gov/programs/digest/d09/tables/dt09_265.asp?referrer=list use: Run from the path where the program is located. Output goes to the screen. xml_filename refers to the data file containing directory data for a specific year. The path to xml_filename should be given in relationship to the path locaton of this program. notes: 1. The c* values in the output refer to columns in Table 265; ie, c2 refers to column 2. 2. The "if" conditionals are an unconventional way to get frequency distributions, but they do allow verification of an entire row of results in Table 265 at one time. example: zorba -e xml_filename:="../2008/HD2008/hd2008.xml" -f -q verify_nces_doe2009_table265_recent.xq -z index=yes :) declare variable $xml_filename external; { let $tmp := for $x in fn:doc($xml_filename)/data/record let $unitid := $x/@unitid, $fips := xs:integer($x/@fips), $sector := $x/@sector, $iclevel := $x/@iclevel, $control := $x/@control, $deggrant := $x/@deggrant, $pset4flg := $x/@pset4flg, $c2 := 1, $c3 := if ($iclevel = "1") then 1 else 0, $c4 := if ($iclevel = "2") then 1 else 0, $c5 := if ($control = "1") then 1 else 0, $c6 := if ($control = "1" and $iclevel = "1") then 1 else 0, $c7 := if ($control = "1" and $iclevel = "2") then 1 else 0, $c8 := if ($control = ("2","3")) then 1 else 0, $c9 := if ($control = ("2","3") and $iclevel = "1") then 1 else 0, $c10 := if ($control = ("2","3") and $iclevel = "2") then 1 else 0, $c11 := if ($control = "2") then 1 else 0, $c12 := if ($control = "2" and $iclevel = "1") then 1 else 0, $c13 := if ($control = "2" and $iclevel = "2") then 1 else 0, $c14 := if ($control = "3") then 1 else 0, $c15 := if ($control = "3" and $iclevel = "1") then 1 else 0, $c16 := if ($control = "3" and $iclevel = "2") then 1 else 0 where $deggrant = "1" and $fips <= 56 and not($sector = ("0","99")) and $pset4flg = "1" return return }