On 9/9/07, Henrik <[EMAIL PROTECTED]> wrote: > All, > > I'm looking for a strategy to generate custom xml output from a > structured wiki page. > > I'm using google maps api to generate maps like this: > http://www.dufferinpark.ca/market/wiki/wiki.php?n=LocalProducers.Map > > Google maps takes an xml table as input, but I would like to have a wiki > front end for this. > > So I propose a wikimarkup like this: > > (:datatable farmers:) > (:datarecord item:) > name:Akiwenzie's Fish > contact:Andrew Akiwenzie > info:/market/wiki/wiki.php?n=Vendors.FrontPage#AkiwenziesFish > phone:519-534-9056 > latitude:44.743178 > longitude:-81.141013 > (:datarecordend:) > (:datarecord item:) > name:Beretta's Organics > contact:Cynthia Beretta > info:/market/wiki/wiki.php?n=Vendors.FrontPage#beretta > phone:416-674-5609 > email:[EMAIL PROTECTED] > website:www.berettaorganics.com > notebook:/market/wiki/wiki.php/VendorNotebook.FrontPage#beretta > image:/common/wiki/pub/googlemaps/farmersmap/beretta.gif > latitude:43.946884 > longitude:-79.584704 > (:datarecordend:) > ... > (:datatableend:) > > Which would map to > > <?xml version="1.0" encoding="utf-8"?> > <farmers> > <item> > <name>Akiwenzie's Fish</name> > <contact>Andrew Akiwenzie</contact> > <info>/market/wiki/wiki.php?n=Vendors.FrontPage#AkiwenziesFish</info> > <phone>519-534-9056</phone> > <latitude>44.743178</latitude> > <longitude>-81.141013</longitude> > </item> > <item> > <name>Beretta's Organics</name> > <contact>Cynthia Beretta</contact> > <info>/market/wiki/wiki.php?n=Vendors.FrontPage#beretta</info> > <phone>416-674-5609</phone> > <email>[EMAIL PROTECTED]</email> > <website>www.berettaorganics.com</website> > <notebook>/market/wiki/wiki.php/VendorNotebook.FrontPage#beretta</notebook> > <image>/common/wiki/pub/googlemaps/farmersmap/beretta.gif</image> > <latitude>43.946884</latitude> > <longitude>-79.584704</longitude> > </item> > ... > </farmers> > > Question: How would I approach this? I'm thinking > Group.DataPage?action=xml hooked into some kind of processing. It would > be nice if the routine could check for $action, which if not xml would > produce readable output for the wiki page itself. >
IMHO, it could be also nice to have individual pages for each farmer, defining the data as a set of PageTextVariables. This would enable all the (:pagelist ...:) feature to handle the list itself, and the rendering could be done with a dedicated "pagelist-formater" function responsible to "extract" some PageTextVariables definitions from page fragments, and to render them as "wiki blocks" (ie. the recipeinfo block of some Cookbook pages) or as a xml data set according to the $action context (browse or xml). -- Dominique _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
