Show Changes Show Changes
Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

9/28/2004 8:35:28 PM
List all versions List all versions

RSS feed for the FlexWiki namespace

Templated Query Behavior
.
Summary
a WikiBehavior that can query pages for the value of properties and instantiate a template with the property values.

Status

I'm still just thinking about this one, so feedback is very welcome!

Concept

What I'm thinking is that it would be nice to be able to do something like this:

Category

And then be able to have a behavior that looked something like this:

  @@TemplatedQuery("NamespaceRegex", "TopicRegex", "PropertyName", "PropertyValueRegex", "Template")@@

Where the various parameters are as follows:

Parameter Semantics
NamespaceRegex A regular expression that filters for namespaces we want to include in the query
TopicRegex A regular expression that filters for topics we want to include in the query
PropertyName The name of the property whose value we are querying
PropertyValueRegex A regular expression that filters for the particular property values we're interested in
Template A set of wiki text that would be emitted for each match that was found

So I can imagine using this something like this:

  @@TemplatedQuery("FlexWiki", ".*", "Category", "WikiBehavior", "        * $Title")@@

This would produce a bullteted list of the title of all pages in the FlexWiki namespace that had a Category property whose value was equal to "WikiBehvior". Note that I've introduced a syntax for emitting the title. I can see this extending to being able to emit whatever captures the regex performs. For example:

  @@TemplatedQuery("FlexWiki", ".*", "Category", "?<CategoryValue>(.*)", "||$Title||$CategoryValue||")@@

to emit a table that would list all pages along with the value of their Category property.

I think this would be incredibly powerful, and particularly useful combined with FwDocGen, where I might want to emit a Status property into each class, method, etc. page, and then have a way to have a table summarizing the status of my development effort.

Questions, Thoughts, and Notes

Discussion

I like this idea a lot. I have already run into this situation where I want to include a page (a list of machines, say) in another page as a list with bullets. I create the page, and it works. But then I realize that people might find that page all on its own, so it needs a Summary: and perhaps a SeeAlso: property. Whoops. Now those show up. There's no facility for just selecting the "body" (whatever that is) of a page for inclusion and not the properties.

What if I put the servers in the page as a property? That sort of works, but I lose formatting, or else the formatting is inconsistent.

The key thing about this for me is the ability to apply WikiText formatting when including values from other pages.

-- TommyWilliams

This will be a powerful capability. I expect that somewhere between 80-100% of this will be possible with the new BehaviorExpressionLanguage I expect to checkin this week. If it's not 100%, adding it will be very easy. I suggest giving me a week to get this in and see how close we are. I think you'll be excited -- DavidOrnstein

Cool! I'll definitely wait and see. Almost no way I could get it done by next week in any event - it's not like I don't have other FlexWiki bits that need looking after. :p -- CraigAndera

Not logged in. Log in

Welcome to the home of FlexWiki, a collaboration tool, based on WikiWiki, implemented using Microsoft .NET technologies

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics