|
12 | 12 | $dbconn = pg_connect("");
|
13 | 13 |
|
14 | 14 | $prevscheme = "";
|
15 |
| -$query = "select herkomst,source,attribute,value,labelnl,description,listname,url from codelists where attribute is not null order by listname"; |
| 15 | +$query = " |
| 16 | +select herkomst,source,attribute,value,labelnl,description,reallistname,url |
| 17 | +from codelists where attribute is not null order by reallistname"; |
16 | 18 | $result = pg_query($query) or die('Query failed: ' . pg_last_error());
|
17 | 19 |
|
18 | 20 |
|
19 | 21 | while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
|
20 |
| - if ($line["listname"] != $prevscheme) |
| 22 | + if ($line["reallistname"] != $prevscheme) |
21 | 23 | {
|
22 | 24 | if ($prevscheme != "")
|
23 | 25 | {
|
24 | 26 | echo " </members>\n";
|
25 | 27 | echo "</Collection>\n";
|
26 | 28 | }
|
27 |
| - $listname = substr($line["url"],0,strrpos($line["url"],"/")); |
28 |
| - $listlabel = substr($listname,1+ strrpos($listname,"/")); |
29 |
| - echo "<Collection rdf:about=\"" . $listname . "\">\n"; |
| 29 | + $reallistname = substr($line["url"],0,strrpos($line["url"],"/")); |
| 30 | + $listlabel = substr($reallistname,1+ strrpos($reallistname,"/")); |
| 31 | + echo "<Collection rdf:about=\"" . $reallistname . "\">\n"; |
30 | 32 | //
|
31 | 33 | // For now we do not know a label for the Collection so we reuse tne
|
32 | 34 | // collectioname.
|
33 | 35 | //
|
34 | 36 | echo " <rdfs:label>" . $listlabel . "</rdfs:label>\n";
|
35 | 37 | echo "<members rdf:parseType=\"Collection\">\n";
|
36 | 38 |
|
37 |
| - $prevscheme = $line["listname"]; |
| 39 | + $prevscheme = $line["reallistname"]; |
38 | 40 | }
|
39 | 41 |
|
40 | 42 | echo " <Concept rdf:about=\"" . $line["url"] . "\">\n";
|
|
0 commit comments