Hi Igor, On 2011-06-02 07:11, Igor Lobanov wrote: > I'm looking for a way to produce matrices out of relations between > arbitrary types of objects/pages in SMW. Simple example would be a > 'traceability matrix' between pages within such categories as 'Business > Requirement' and 'System Requirement'. Constructed matrix would have > business requirements and system requirements as row and column headers > respectively, while actual elements would be either emply (no > traceability) or flagged (traceability exists). > > Good example is provided in the Wikipedia article: > http://en.wikipedia.org/wiki/Traceability_matrix > > More complex example (one that I have in mind) would be based not on a > simple relationship, but on internal objects representing relationships > among various objects with additional scalar properties. In this case, > cell content would be more flexible and somehow derived from the > properties, e.g. color, icons, formatting, etc. > > Next, I'm able to produce such matrices using a moderately complex > incantation based on obscure things like arrays and loops, but it's > O(NxM), needs to be tailored for a particular type of matrix, and look > awful in general. > > I believe that general-purpose matrix/pivot style result formatter for > inline queries would be good for SMW. Moreover, I'd like to try to blow > the dust from my PHP skills and actually produce one. What I'm looking > for is some informed advice on how to approach this one. > > My initial idea is to create an extension that introduces a > {{#pivot...}} instruction that actually does underlying query and > formatting. Does it make sense? Or it is something that can't be built > outside the SMW core?
That sounds indeed very useful. I'm just a user of SMW, but I think the best way to implement this would be as an extension similar to Semantic Result Formats, or even better, within that extension. It would then not be a separate parser function, but just an output format, that can be chosen via the 'format' parameter to an #ask query. Patrick. -- Key ID: 0x86E346D4 http://patrick-nagel.net/key.asc Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel