I have an article with multiple instances of the same relationship:
-----------------------Banggai Cardinalfish----------------------------
[[native range::Banggai Islands]]
[[native range::Indonesia]]
[[native range::Sulawesi]]
[[common name:={{PAGENAME}}]]
[[Category:Species]]
---------------------------------------------------------------------------------
I am using the Semantic Forms extension to collect this data through a
template. The code above is a simplified representation cutting out other
data that's not relative to my question. I would like to list the "native
range" relationships for this page separated by commas but have control over
the output of each native range so that I can provide links and/or other
data specific to that native range. Most likely I will want to suppress the
output of the native range above once I have the comma separated list but
that should simply be a matter of using CSS to set the display to none. The
real problem is creating the comma separated list. This was my first
attempt:
---------------------------------------------------------------------------------
<ask format="template" template="Native range display">
[[Category:Species]]
[[common name:=Banggai Cardinalfish]]
[[native range::*]]
</ask>
---------------------------------------------------------------------------------
------------------Template:Native range display--------------------
'''Native range(s):''' {{{2}}}
---------------------------------------------------------------------------------
The problem with the above "ask" is that Semantic MediaWiki is returning the
comma separated list for me in one row. I want it to return a separate row
for each "native range" so that I can control the output of each one. If I
put the relationship in the native range articles instead of the species
articles I could easily create an "ask" query that would return separate
rows. However, this would be counter-intuitive for users entering data and
isn't really an option.
Does anyone have any suggestions on how I could write a query that would
give me separate rows for each instance of a relationship (or attribute)
within an article?
Thanks,
Bradley
--
Bradley Holt
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-user