[pmwiki-users] New Recipe - Wikipaths at last!

Martin Fick mogulguy at yahoo.com
Fri Nov 10 01:33:20 CST 2006


After a long period of gestation, from the time of
inception to this first release, I am proud to finally
announce the Wikipath recipe, a page text lookup
grammar which attempts to understand wiki page
structure:

http://www.pmwiki.org/wiki/Cookbook/Wikipath


If you are familiar with them, think of wikipaths as a
cross between regular expressions and XPath. Wikipaths
allow you to query (lookup) text in a wiki page by
describing the type of text that you are looking for
or the type of section that the text will be in. In
some sense they are a glorified version of pagetext
variables mixed with the include directive. For
example, like a pagetext variable you could lookup
data values like: 

Phone: (777) 222-5678

with {$:Phone}. But now imagine that you have many
people listed on a page and their phone #s are all
written just like above, but each person's data was
preceded by a heading with their name. You can now say
lookup the phone # after the heading Joe like this:
{{$!Joe:Phone}} 

To achieve this, wikipaths have an intricate
structured grammar which is designed around the wiki
page structuring markups that allows for exact paths
to your data to be defined. A wikipath is an
expression (a pattern) that describes the path to the
data that you are looking up.

-Martin

P.S. And yes, Patrick, this recipe should probably
still be considered "pie in the sky" :) since I do not
yet use it on my own wiki. But I just had to design it
since I think it's so cool!



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com




More information about the pmwiki-users mailing list