WikiPath Pub

WikiPath is one of the "research" aspects of this site. The idea is to browse wiki topics and their contents/properties with XPATH like expressions. See this blog: Wiki Domain Models and Racer Kids for the big idea.

Wiki categories and attributes

Every wiki page has a category (such as Race, Topic or Venue), which you can think of as the tag name in XPath and also attributes, such as name which you can get to with @name.


You can use XP starting from a topic in a very simple REST like manner:

The response will be a JSON array:

[ "", "May 27, 2012"]

Wiki content

Inside a wiki topic, you can use this notation {{xp:expression}} or {{xpl:expression}} to include the result of the expression. The second version is for a list of elements.


{{xp:root(Calendar:OO_XC_2013)/Race/@date}} ?



    {{xp:root(Calendar:OO_XC_2013)/Race/Venue}} ?


      Here's some examples:

      • {{xpl:root(Blog:Cool_Scala)/Post[tags ~= '.*dsl.*']}} - all scala posts tagged dsl

      The "all" root

      There is a special root to browse all pages, please use it carefully:

      {{xpl:root(*)/Venue}} - all venues

      or as a REST API:


      The attributes

      The attributes you can access are all those tagged inside the wiki page like @date and some special attributes:

      • name the name of the topic
      • category the category
      • label
      • id the unique id of the topic
      • tags - comma separated list of tags
      • url the relative url of this topic
      • content the actual original content of the topic

      Also the contents of the sections of the page are available as attributes.

      Custom JSON API

      As an extension to XPATH, you can combine a few attributes in the same response, for instance:

      This will return a JSON array:

        "label":"OO XC Colborne, {{by Northumberland Trail Riders}}, {{date May 20, 2012}}",
        "date":"May 27, 2012",
        "label":"OO XC Mansfield, {{by HORRA}}, {{date May 27, 2012}}",

      More examples

      Escaping the URL to query an expression - for instance all blog posts tagged with carving:

      Was this useful?    

      By: Razie | 2013-04-10 .. 2016-09-23 | Tags: admin

      Viewed 1633 times ( | History | Print ) this page.

      You need to log in to post a comment!

      © Copyright DieselApps, 2012-2022, all rights reserved.