Actually, that sounds like it would be harder to add, since it would involve modifying the inline query code. And SMW already has an object model, complete with a concept of classes; at least in my opinion.


On Sun, Apr 19, 2009 at 2:28 PM, Etienne Fortin <> wrote:

Semantic Internal Objects seems to be a good addition to SMW. I've seen something similar on the web. It looks like a master thesis of some sort, and it adds classes and objects notions to SMW.

Maybe an intermediary step would be good as well, instead of geting full blown object model in SMW. I was thinking about it and came with a simple idea based on many-valued properties : aggregates. A many-valued property could be defined as an aggregate, which is the aggregation of existing properties. An example of definition:
[[is aggregate::SomeProperty;SomeOtherProperty;YetAnotherProperty]]

Values would be given the same way a many-valued property gets its valued. Where it is different is in how they get displayed. It would be possible to access any part of the many-valued property, by its content name (SomeProperty, SomeOtherProperty).
{{#ask: [[Category:SomeCategory]] [[ManyValuedProperty::value0;?;?]]
| ?ManyValuedProperty::SomeOtherProperty = HeaderTitle

Since it points to other properties, then it may simplify adding "allow multiple" to part of many-valued properties. But I'm still new to SMW code base so I may be completely off track.

And writing about this idea made me wonder that it may not be necessary to go that far and add a new concept to be able to display many-valued properties in a more flexible way. How about accessing part of these properties as you access an array?
{{#ask: [[Category:SomeCategory]] [[ManyValuedProperty::value0;?;?]]
| ?ManyValuedProperty[0] = HeaderTitle
| ?ManyValuedProperty[1] = SomeOtherTitle
| ?NonManyValuedProperty = OtherOProperty

This shouldn't be that hard to add. What do you think?


-----Original Message-----
From: Yaron Koren []
Sent: Fri 4/17/2009 12:57 PM
To: Etienne Fortin
Subject: Re: [Semediawiki-user] Multiple properties with same name in the same page

Well, it's one or the other, depending on whom you ask. :)

You're talking about defining properties within groups within a single page. You can do that already, to some extent, using many-valued properties:

This approach, though, has some limitations, listed on that page: among them, you have very little control over how the data gets displayed.

I presented what I think is a reasonable roadmap toward a better solution here:

The final result would be a new extension called "Semantic Internal Objects"; I'm, in theory, still working on this extension, although I haven't looked at it in a while.


On Thu, Apr 16, 2009 at 4:47 PM, Etienne Fortin <> wrote:

        Hello all,
        I've been  toying with Semantic Mediawiki for a couple of months now and just LOVE it. But as in everything, it doesn't always do what I want the way I want it. Sometimes it's because I don't know how to use the software properly yet, sometimes it's just that the software is limited. For my question, I don't know exactly what is the right answer so here it is.
        Scenario : Let's say I have properties grouped together that defines something. I have SomethingAuthor SomethingDescription, SomethingStatus. There can be multiple SOMETHING property group present in the same page. When I query for these properties, I want each group to be on a distinct row in my results table.
        Problem: Semantic mediawiki seems to be made for one property name per page, not multiple one. It also seems that SMW always do SELECT DISTINCT on the database, removing redundant values. But in my scenario, I want to have all these redundant values. I want to be able to group together properties and have a meaning for that group.
        Soooooo, which one is true : RTFM or Limitation of SMW?

        Etienne Fortin


        Stay on top of everything new and different, both inside and
        around Java (TM) technology - register by April 22, and save
        $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
        300 plus technical and hands-on sessions. Register today.
        Use priority code J9JMT32.
        Semediawiki-user mailing list