@prefix tt: . @prefix ottr: . @prefix xsd: . # The prefixes a table's cells use for IRIs: a cell holding "shop:inkwell" is # . @prefix shop: . @prefix book: . @prefix stock: . # Row templates: one row of a table, in, and the trail's patterns, out. # A shop's stock, as data/prepared/shop-stock.* has it: one row per shop and four # parallel lists. The IRI lists are non-blank (!), as the parameters they feed are. cross makes one tt:Stocks for each book; zipMin takes the lists in # step, and makes one stock record for each position in them. tt:ShopStock [ ! ottr:IRI ?shop, ! NEList ?records, ! NEList ?books, NEList ?copies, NEList ?prices ] :: { cross | tt:Stocks(?shop, ++?books), zipMin | tt:StockRecord(++?records, ?shop, ++?books, ++?copies, ++?prices) } .