'') ft_q := concat ('"', replace (q, '"', ' '), '"'); filter_active := 0; if (q <> '' or from_date <> '' or to_date <> '' or selected_category <> '') filter_active := 1; category_seen := dict_new (101); category_cloud := ''; has_categories := 0; all_count := 0; -- Pass 1: collect .html and .md resources; note stems that have an HTML rendition all_rows := vector (); html_stems := dict_new (61); if (q = '') { for (select RES_NAME as _name, RES_MOD_TIME as _mod, RES_CONTENT as _cont from WS.WS.SYS_DAV_RES where (RES_FULL_PATH like '/DAV/home/demo/Public/fifa-kg/%.html' or RES_FULL_PATH like '/DAV/home/demo/Public/fifa-kg/%.md') and RES_NAME not like '._%' order by RES_MOD_TIME desc, RES_NAME desc) do { declare s, ext, stem varchar; declare dpos int; dpos := strrchr (_name, '.'); stem := subseq (_name, 0, dpos); ext := lower (subseq (_name, dpos + 1)); if (ext = 'html') dict_put (html_stems, stem, 1); s := subseq (blob_to_string (_cont), 0, 8000); all_rows := vector_concat (all_rows, vector (vector (_name, _mod, s, ext, stem))); } } else { for (select RES_NAME as _name, RES_MOD_TIME as _mod, RES_CONTENT as _cont from WS.WS.SYS_DAV_RES where (RES_FULL_PATH like '/DAV/home/demo/Public/fifa-kg/%.html' or RES_FULL_PATH like '/DAV/home/demo/Public/fifa-kg/%.md') and RES_NAME not like '._%' and contains (RES_CONTENT, ft_q) order by RES_MOD_TIME desc, RES_NAME desc) do { declare s, ext, stem varchar; declare dpos int; dpos := strrchr (_name, '.'); stem := subseq (_name, 0, dpos); ext := lower (subseq (_name, dpos + 1)); if (ext = 'html') dict_put (html_stems, stem, 1); s := subseq (blob_to_string (_cont), 0, 8000); all_rows := vector_concat (all_rows, vector (vector (_name, _mod, s, ext, stem))); } } -- Pass 2: keep every .html; keep a .md only when no .html counterpart shares its stem posts := vector (); for (i := 0; i < length (all_rows); i := i + 1) { declare r any; declare s, t, ext, stem, dav_path, category_val, item_date varchar; declare raw_category any; declare category_match, scan_pos, semi_pos, cat_count int; declare one_category, active_tag, rest_category, display_category varchar; r := aref (all_rows, i); s := aref (r, 2); ext := aref (r, 3); stem := aref (r, 4); if (ext = 'md' and dict_get (html_stems, stem, null) is not null) goto next_row; if (ext = 'html') { t := regexp_match ('[^<]+', s); if (t is not null) { t := replace (t, '', ''); t := replace (t, '', ''); t := trim (t); } } else { -- Markdown title fallback: avoid escape-heavy line splitting in VSP compile path. t := stem; } if (t is null or t = '') t := aref (r, 0); item_date := sprintf ('%04d-%02d-%02d', year (aref (r, 1)), month (aref (r, 1)), dayofmonth (aref (r, 1))); if (from_date <> '' and item_date < from_date) goto next_row; if (to_date <> '' and item_date > to_date) goto next_row; dav_path := sprintf ('/DAV/home/demo/Public/fifa-kg/%s', aref (r, 0)); raw_category := null; for (select P.PROP_VALUE as _cat from WS.WS.SYS_DAV_RES R, WS.WS.SYS_DAV_PROP P where R.RES_FULL_PATH = dav_path and P.PROP_PARENT_ID = R.RES_ID and P.PROP_TYPE = 'R' and P.PROP_NAME = 'schema:category') do { raw_category := _cat; } if (raw_category is null) { for (select CATEGORY as _stage_cat from DB.DBA.DEMO_FIFA_KG_DAV_CATEGORY_STAGE where PATH = dav_path) do { raw_category := _stage_cat; } } category_val := ''; if (raw_category is not null and isstring (raw_category)) category_val := trim (cast (raw_category as varchar)); category_match := 0; if (selected_category = '') category_match := 1; if (category_val <> '') { rest_category := category_val; while (rest_category <> '') { semi_pos := strchr (rest_category, ';'); if (semi_pos is null) { one_category := trim (rest_category); rest_category := ''; } else { one_category := trim (subseq (rest_category, 0, semi_pos)); rest_category := trim (subseq (rest_category, semi_pos + 1)); } if (one_category <> '' and length (one_category) > 2) { has_categories := 1; if (one_category = selected_category) category_match := 1; cat_count := cast (dict_get (category_seen, one_category, 0) as int) + 1; dict_put (category_seen, one_category, cat_count); } } } all_count := all_count + 1; if (selected_category <> '' and category_match = 0) goto next_row; posts := vector_concat (posts, vector (vector (aref (r, 0), aref (r, 1), t, ext, category_val, item_date))); next_row: ; } if (has_categories) { dict_iter_rewind (category_seen); while (dict_iter_next (category_seen, facet_key, facet_value)) { facet_category := cast (facet_key as varchar); facet_count := cast (facet_value as int); facet_active := ''; if (facet_category = selected_category) facet_active := ' is-active'; category_cloud := concat (category_cloud, sprintf ('%V%d', facet_active, facet_category, q, from_date, to_date, facet_category, facet_count)); } } n := length (posts); idx := 0; post_selected := 0; sel := http_param ('post'); if (isstring (sel)) { for (i := 0; i < n; i := i + 1) { if (aref (aref (posts, i), 0) = sel) { idx := i; post_selected := 1; } } } if (feed_type = 'rss') { http_header ('Content-Type: application/rss+xml; charset=UTF-8 '); http (' '); http (' '); http ('FIFA Knowledge Graph Weblog '); http ('https://demo.openlinksw.com/weblog/ '); http ('Linked Data, AI agents, knowledge graphs, and data spaces from the FIFA Knowledge Graph DAV Collection. '); http ('Virtuoso Server Pages over WebDAV '); for (i := 0; i < n; i := i + 1) { declare fname, ftitle varchar; declare fmod datetime; fname := aref (aref (posts, i), 0); fmod := aref (aref (posts, i), 1); ftitle := aref (aref (posts, i), 2); http (' '); http (sprintf ('%V ', ftitle)); http (sprintf ('https://demo.openlinksw.com/weblog/?post=%U ', fname)); http (sprintf ('https://demo.openlinksw.com/weblog/?post=%U ', fname)); http (sprintf ('%V ', ftitle)); http (' '); } http (' '); return; } if (feed_type = 'atom') { http_header ('Content-Type: application/atom+xml; charset=UTF-8 '); http (' '); http (' '); http ('FIFA Knowledge Graph Weblog '); http ('https://demo.openlinksw.com/weblog/ '); http (' '); http (' '); if (n > 0) { declare umod datetime; umod := aref (aref (posts, 0), 1); http (sprintf ('%04d-%02d-%02dT00:00:00Z ', year (umod), month (umod), dayofmonth (umod))); } else http ('2026-07-17T00:00:00Z '); for (i := 0; i < n; i := i + 1) { declare fname, ftitle varchar; declare fmod datetime; fname := aref (aref (posts, i), 0); fmod := aref (aref (posts, i), 1); ftitle := aref (aref (posts, i), 2); http (' '); http (sprintf ('%V ', ftitle)); http (sprintf ('https://demo.openlinksw.com/weblog/?post=%U ', fname)); http (sprintf (' ', fname)); http (sprintf ('%04d-%02d-%02dT00:00:00Z ', year (fmod), month (fmod), dayofmonth (fmod))); http (sprintf ('%V ', ftitle)); http (' '); } http (' '); return; } if (feed_type = 'atompub' or feed_type = 'atomPub') { http_header ('Content-Type: application/atomsvc+xml; charset=UTF-8 '); http (' '); http ('FIFA Knowledge Graph WeblogFIFA Knowledge Graph DAV Collection '); return; } ?> FIFA Knowledge Graph Weblog

FIFA Knowledge Graph Weblog

FIFA Knowledge Graph demos & assets — a weblog view of FIFA Knowledge Graph DAV Collection

No matching posts

'); else http ('

No posts yet

'); } else if (filter_active and post_selected = 0) { http ('
Search Results'); http (sprintf ('

%d matching posts

', n)); http ('
    '); for (i := 0; i < n; i := i + 1) { declare rname, rtitle, rdate, rcat varchar; declare rmod datetime; rname := aref (aref (posts, i), 0); rmod := aref (aref (posts, i), 1); rtitle := aref (aref (posts, i), 2); rcat := aref (aref (posts, i), 4); rdate := sprintf ('%s %d, %d', aref (months, month (rmod) - 1), dayofmonth (rmod), year (rmod)); http ('
  • '); http (sprintf ('%V', rname, rtitle)); if (rcat <> '') http (sprintf ('%V', rcat)); http (sprintf ('
    %V
    ', rdate)); http ('
  • '); } http ('
'); } else { declare cname, ctitle, cext varchar; declare cmod datetime; declare cdate varchar; cname := aref (aref (posts, idx), 0); cmod := aref (aref (posts, idx), 1); ctitle := aref (aref (posts, idx), 2); cext := aref (aref (posts, idx), 3); cdate := sprintf ('%s %d, %d', aref (months, month (cmod) - 1), dayofmonth (cmod), year (cmod)); if (cext = 'html') { http ('
'); http (sprintf ('
', cname, ctitle)); http ('
'); } else { http ('
'); http ('
'); if (idx = 0) http (sprintf ('Latest Post — %V', cdate)); else http (sprintf ('From the Archive — %V', cdate)); http (sprintf ('

%V

', ctitle)); http (sprintf ('', cdate, cname)); http ('
'); http (sprintf ('
', cname, ctitle)); http ('
'); } } ?>