Re: [SMW-devel] {{#ask}}

2007-11-28 Thread Jim Wilson
Of course, I am THRILLED that this is coming down the pipe.

Sergey, If you're planning to do something crazy, I suggest checking
out DPL and RegExParserFunctions.
Combining {{#ask}} with {{#dpl}} and {{#regex}} can produce some very
neat combinations.  Also, I'm interested to see what you come up with
in the way of {{#ask}} queries.

-- Jim

On Nov 27, 2007 5:04 PM, Sergey Chernyshev
<[EMAIL PROTECTED]> wrote:
> Perfect - it works great for what I was planning to use it for! Now almost
> no barriers are there ;)
>
> Sergey
>
>
>
>
> On Nov 27, 2007 4:43 PM, Markus Krötzsch < [EMAIL PROTECTED]> wrote:
> >
> > On Dienstag, 27. November 2007, Sergey Chernyshev wrote:
> > > WOW! Markus, this is great present for being back from vacation! ;) I'll
> > > test it on my instances as soon as I'll get some time with computer
> > > tomorrow.
> >
> > Great, hope you like it. Surprisingly, most of the work had to go into
> > modifying Special:Ask to allow linking to queries using internal links,
> and
> > into supporting the new separation of printout requests and queries (which
> > also makes way for some more "presents"). I had to adopt the Special:ask
> > interface a little to account for this. I will drop another short note
> about
> > recent changes and then be offline for a few days. I guess RC3 would be in
> > order after this.
> >
> > Markus
> >
> >
> >
> >
> >
> > >
> > >  Sergey
> > >
> > > On Nov 23, 2007 4:01 PM, Markus Krötzsch <[EMAIL PROTECTED]>
> wrote:
> > > > And another note: {{#ask}} is in SVN (in a first version).
> > > >
> > > > Working example query:
> > > >
> > > > {{#ask: [[Category:Country]] [[borders::Nigeria]] |
> > > >  ?population|
> > > >  ?area#km² = ''Size''|
> > > >  format=list|
> > > >  limit = 3|
> > > >  link=all|
> > > >  intro=Test_|
> > > > }}
> > > >
> > > > Moreover, it is now of course possible to use templates and their
> params
> > > > rather freely in {{#ask}}. Actually even some very unreasonable things
> > > > work,
> > > > but many cool things should also be possible. One real issue might be
> > > > that uninitiated users might nest {{#ask}} in order to emulate
> > > > -subqueries, even though the latter are much more efficient and
> > > > complete. Of course nesting sometimes is desirable:
> > > >
> > > > {{#ask:
> > > > [[Category:Country]]
> > > > [[population::>{{#ask:headers=hide|?Population|[[Uganda]]}} ]]  |
> > > >  sort=population|
> > > >  ?population
> > > > }}
> > > >
> > > > This indeed works now.
> > > >
> > > > Here is what should hopefully work for #ask on SVN:
> > > >
> > > > * all printout formats other than "debug" (which still gives some
> HTML),
> > > > * all known parameters (though some now are more flexible since you
> can
> > > > use
> > > > wiki-markup as values),
> > > > * printout requests with the syntax "? property#unit = label",
> > > > * basic queries, nested queries, value ranges, wildcards, and yet
> > > > *  should work as it did before (I hope).
> > > >
> > > > Here is what certainly does not work:
> > > >
> > > > * links to further results don't work in wikitext (we need another
> > > > URL-scheme
> > > > for that, but "external" links may be my first fix),
> > > > * printouts of Categories do not work via "? Category" yet,
> > > > * disjunctions in queries obviously do not work yet, since "|" is
> already
> > > > taken in templates (Sergey suggested a solution that would require
> > > > queries to
> > > > be the last #ask-parameter, but we may even get around this by
> providing
> > > > an
> > > > alternative syntax for "||"),
> > > > * a query with limit 0 might show a broken further results link,
> > > > * templated and embedded printers may pull annotations into the
> article
> > > > where
> > > > the query is -- this needs some advanced fix as there is currently no
> way
> > > > for
> > > > us to distinguish #ask-printed results from the text someone entered
> > > > directly.
> > > >
> > > > I guess there are more things, but at least most of the above should
> be
> > > > fixed
> > > > soon. Feel free to try out the devel version (otherwise it's pretty
> much
> > > > RC2,
> > > > no updates needed) and let me know what breaks/works/is still missing.
> > > >
> > > > Cheers,
> > > >
> > > > Markus
> > > >
> > > > --
> > > > Markus Krötzsch
> > > > Institut AIFB, Universät Karlsruhe (TH), 76128 Karlsruhe
> > > > phone +49 (0)721 608 7362fax +49 (0)721 608 5998
> > > > [EMAIL PROTECTED]www  http://korrekt.org
> >
> >
> >
> > --
> >
> >
> >
> > Markus Krötzsch
> > Institut AIFB, Universät Karlsruhe (TH), 76128 Karlsruhe
> > phone +49 (0)721 608 7362fax +49 (0)721 608 5998
> > [EMAIL PROTECTED]www  http://korrekt.org
> >
>
>
> -
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http:

Re: [SMW-devel] {{#ask}}

2007-11-12 Thread Jim Wilson
Although I am in favor of {{#ask:}} at the earliest possible
conveneince, after a cursory look through the code, I'm fairly certain
this extension will fail to operate as expected.

The first reason is that , which is an extension tag, will always
return fully qualified HTML.  The output of a parser function is
expected to be wikitext, which will be further processed.  The result
is that if the output of the {{#ask:}} call contains any links,
they'll be HTML links (like something), not
wiki text (like [[something]]).  When the Parser reads these HTML tags
during subsequent processing, it'll convert the '<' and '>' symbols to
their entity equivalents '<' and '>' so in the browser you
actually see 'whatever', not a nice link.

The second reason is that one of the huge benefits of having an
{{#ask:}} parser function is nesting.  The idea that you could
{{#ask:something={{#ask:something else.  I'm not sure if SMW
supports nested  tags, but if not, this would also be a failure
mode of the aforementioned extension.

Again, I would like nothing more from SMW than an {{#ask:}} template -
which would be a __HUGE__ improvement for advanced use cases, but I
don't think that this extension is the answer everyone hopes it is.

-- Jim R. Wilson (jimbojw)

On Nov 12, 2007 10:38 AM, Sergey Chernyshev
<[EMAIL PROTECTED]> wrote:
> Yaron noticed that there is new inline query extension posted on
> MediaWiki.org: http://www.mediawiki.org/wiki/Extension:SMW_ParserFunctionAsk
>
>  I'm definitely going to install it and see if it'll work for my needs, but
> what bothers me is the size of it - it seems to be too simple ;)
>
> I also noticed that it's not going to support '=' or '|' in the queries, but
> it's easy to implement it using the code I sent in before.
>
> Markus, could you please look at it and let us know if you anticipate any
> problems with this code?
>
>  Sergey
>
>
> --
> Sergey Chernyshev
>  http://www.sergeychernyshev.com/
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Hiding some information

2007-10-25 Thread Jim Wilson
> I guess another total hack is to name all the private properties similarly
> and therefore detectably - and then at render time, if the user is an
> admin, print those, and if the user is not, don't.

Assuming you had a way to programmatically determine whether the user
has privs to see the info, the next problem to address is caching.
MediaWiki caches the rendered versions of pages to save processing
from visitor to visitor.

-- Jim R. Wilson (jimbojw)

On 10/25/07, Asheesh Laroia <[EMAIL PROTECTED]> wrote:
> On Thu, 25 Oct 2007, S Page wrote:
>
> > Asheesh Laroia wrote:
> >> Is it possible to hide some attributes so that only admins can see
> >> them?
> >
> > From what I know of the code, not easily.  When a page is saved, SMW
> > parses its annotations and stores the semantic annotations in tables.
> > There's a smw_attributes table with the page ID, the property name, and
> > its value.  No access control at the database level.
> >
> > Yes, you could add a special property Only_for_admins and modify the SMW 
> > code
> > to check this before it does anything with a property.  SMW 1.0 tends to
> > create a DataValue whenever it deals with a property so the change might be
> > well-encapsulated.
> >
> > HOWEVER,
> > Normally the User:Asheesh_Laroia page would form the subject of both the
> > public Property:Email and the private Property:telephone, so both properties
> > have to be specified on the same page.  So how are you going to have a
> > partly-private page in MediaWiki?  Are you thinking of having a separate
> > private details page that is somehow tied in with the public page?  That
> > makes querying much harder.  Maybe you could have a separate namespace for
> > Confidential:Asheesh_Laroia and modify SMW to look up in that as well if the
> > user is an admin.
>
> I guess another total hack is to name all the private properties similarly
> and therefore detectably - and then at render time, if the user is an
> admin, print those, and if the user is not, don't.
>
> What do you [guys] make of that approach?
>
> Thanks for the quick and thoughtful reply!
>
> -- Asheesh.
>
> --
> Humans are communications junkies.  We just can't get enough.
> -- Alan Kay
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Template params are not expanded within queries

2007-10-17 Thread Jim Wilson
What's funny about this (to me), is that I actually took the time to
develop such a parser function, created a patch and submitted it to
bugzilla[1].

Needless to say it was never incorporated because of a pending
"rewrite" of some core functionality.  So I created an extension to do
this as well[2].

I haven't tested the extension against any other version of SMW than
what I originally targeted, so it may no longr work. I believe I
developed against 0.7.

[1] http://bugzilla.wikimedia.org/show_bug.cgi?id=10021
[2] 
http://jimbojw.com/wiki/index.php?title=SMW_InlineQueryParserFunction_Extension

Good luck!

-- Jim R. Wilson (jimbojw)

On 10/17/07, Sergey Chernyshev
<[EMAIL PROTECTED]> wrote:
> Sorry, my first main missed the list again:
>
> Yes, I think that's in the plans (although Markus didn't reply to my email
> about it on the list).
>
>
>
> On 10/17/07, Luka Frelih <[EMAIL PROTECTED]> wrote:
> > hello!
> > > Yaron and I observed a problem with template parameters handling
> > > within  queries in SMW 1.0 RC1.
> > > Basically they don't get expanded.
> > > I've created a bug in MediaZilla for that:
> > > http://bugzilla.wikimedia.org/show_bug.cgi?id=11684
> > > Same problem exists within template rendering when template is used as
> > > format for querying. Luka's patch doesn't help with it.
> > i think a simple way to get this functionality would be to implement an
> > ask function. as functions get parsed later than the tags, template
> > parameters and functions within it would get expanded before the call.
> >
> > if i'm not mistaken someone has already done some work towards that.
> >
> > LF
> >
> >
> >
> -
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > ___
> > Semediawiki-devel mailing list
> > Semediawiki-devel@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
> >
>
>
>
> --
> Sergey Chernyshev
> http://www.sergeychernyshev.com/
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] InlineQueryParserFunction

2007-05-23 Thread Jim Wilson

Update:

I've logged bug 10021 as an enhancement request for an Inline Query Parser
Function {{#ask}} and created a patch implement the change:

http://bugzilla.wikimedia.org/show_bug.cgi?id=10021

Dear core SMW devs, PLEASE review my patch at your convenience - I'll be
happy to answer any questions.  Thanks!

-- Jim R. Wilson (jimbojw)

On 5/22/07, Jim Wilson <[EMAIL PROTECTED]> wrote:


Thanks cnit!

I'm glad someone else would find this useful.  I'll be happy to integrate
my code into the SMW codebase and create a patch ... I would just like some
assurance from a core dev that my patch has a chance of being applied before
I go through the work of making it.

-- Jim

On 5/22/07, cnit <[EMAIL PROTECTED]> wrote:
>
> Hi Jim!
> ask parser function is a great idea, I think it may be used
> to overcome horrible MW parser limitation, which doesn't allow to use
> template parameters in parser extension tags, like  :-(
> What Markus and S Page would think about this idea?!
> Dmitriy
>
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Reflexive results?

2007-05-23 Thread Jim Wilson

Hi MovGP0,

I've come up with a workable workaround.

What I'll do is use two instances of my inline query parser function
{{#ask}} instead of the extension tag  and then perform parsing on the
results to produce an intersection.

So basically (using the extension tag syntax), I'll do:
* [[Whoever]][[has friend::*]]
* [[has friend::Whoever]]
* Remove singletons using a regular expression - meaning anything thats' not
duplicated later in the list.

The result then will be the reflexive result of the "has friend"
relationship.

Since all this occurs using parser functions, it can be encapsulated within
templates.

So I might have a Template:Reflexive_ask that takes two parameters: the
originating page, and the relationship.  Continuing the previous example, it
would be called like this: {{reflexive ask|Whoever|has friend}}

It's a work in progress.  I've got a functional parser function counterpoint
to the  extension tag - the next step is to produce a patch to push
into the codebase.

-- Jim

On 5/23/07, MovGP0 <[EMAIL PROTECTED]> wrote:


Sergey Chernyshev wrote:
> Does it work when Subject is defined as *?
>
> Like if you have a relation on Sergey's page defined as:
>
>Sergey knows [[Has friend::John Doe]] and [[Has friend::Jane Doe]]
> from
> high school and [[Has friend::Peter Smith]] from college.
>
> and on Yaron's page defined as:
>
>Yaron knows [[Has friend::John Doe]] from college and [[Has
> friend::Peter Smith]] from work.
>
> Regular query
>
>[[Has friend::*]]
>
> will return:
>
>   Sergey   John Doe
>Jane Doe
>Peter Smith
>
>   Yaron John Doe
>Peter Smith
>
> But what if I want to get result of "Is a friend of" (opposite to "Has
> friend") and expect results like this:
>
>   John DoeSergey
> Yaron
>
>   Jane DoeSergey
>
>   Peter Smith Yaron
> Sergey
>
> What kind of query should I run? [[*::Has friend]] doesn't seem to
> help ;(
If you think that "has friend" is a symmetrical property, then this
would need semantic reasoning, which is currently simply not implemented
in SMW.
But I think that "has friend" is not symmetrical anyway, because the
other guy coul'd be an asshole.
If "is friend of" is the inverse of "has friend" you should search using
[[is friend of::*]], but again there is still no reasoning that can
figure this out automatically.
Also I think too that the subject should be queryable, but it isn't
currently.

ys, MovGP0
>
>
> On 5/18/07, Yaron Koren <[EMAIL PROTECTED]> wrote:
>>
>> Well, my mistake - I tried it out, and it appears "inverse queries",
>> i.e. queries that return the object of triples, given the subject,
>> work. And it looks like the functionality has been in SMW for a
>> while... for some reason, it's not mentioned in the help page
>> (http://ontoworld.org/wiki/Help:Inline_queries), and I couldn't see
>> documentation anywhere else either. Is this a secret or unsupported
>> feature? In any case, good to know.
>>
>> -Yaron
>>
>>
>> On 5/17/07, Yaron Koren <[EMAIL PROTECTED]> wrote:
>> > This question is a little confusing to think about (at least for me),
>> > because "friend of" is, in real life, always a bi-directional
>> > relationship. So let me substitute something that's more clearly
>> > one-directional for this example: how about "has been to the house
>> > of".
>> >
>> > Looking at it that way, I don't believe your first example will work.
>> > I don't think there's any way to determine whom a person "has been to
>> > the house of" - you can only find out who "has been to the house of"
a
>> > certain person. I think what you're looking for is an inverse query,
>> > which isn't supported, though the issue has come up before on this
>> > mailing list.
>> >
>> > -Yaron
>> >
>> >
>> > On 5/17/07, Jim Wilson <[EMAIL PROTECTED]> wrote:
>> > > Hi SMW Devs,
>> > >
>> > > Quick question: is there a way to get a list of all articles that
>> meet
>> a
>> > > reflexive criteria?
>> > >
>> > > For example, I've got a relation called "friend of", and I know
>> how to
>> do
>> > > these types of queries:
>> > >
>> > > [[User:Whoever]][[friend of::*]] - This will ret

Re: [SMW-devel] InlineQueryParserFunction

2007-05-22 Thread Jim Wilson

Thanks cnit!

I'm glad someone else would find this useful.  I'll be happy to integrate my
code into the SMW codebase and create a patch ... I would just like some
assurance from a core dev that my patch has a chance of being applied before
I go through the work of making it.

-- Jim

On 5/22/07, cnit <[EMAIL PROTECTED]> wrote:


Hi Jim!
ask parser function is a great idea, I think it may be used
to overcome horrible MW parser limitation, which doesn't allow to use
template parameters in parser extension tags, like  :-(
What Markus and S Page would think about this idea?!
Dmitriy


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] InlineQueryParserFunction

2007-05-21 Thread Jim Wilson

Hi again,

Since no one responded, I took the "least community involvement" route.

Version 0.1 of SMW_InlineQueryParserFunction is now available for download:

http://jimbojw.com/wiki/index.php?title=SMW_InlineQueryParserFunction_Extension

I hope to engage a core SMW dev on the possibility of integrating this
functionality into the core.  Thanks for taking the time to respond.

-- Jim R. Wilson (jimbojw)

On 5/18/07, Jim Wilson <[EMAIL PROTECTED]> wrote:


Hi all,

I'm currently working on an InlineQuery Parser Function called {{#ask}}

So this: [[friend of::*]]

Becomes this: {{#ask:format=ul|[[friend of::*]]}}

I thought I was done, having basically written a wrapper around  that
simply uses the Parser Function interface instead of an extension tag.
Unfortunately this will not work as a general purpose solution since the
output of  is raw HTML, not Wikitext.

So, it's not going to be as easy as I'd hoped. :(   However, there are at
least two solutions:

1) Continue to wrap  and parse the resultant HTML back to wikitext
(dirty, dirty hack, but requires no core changes and no core functionality
duplication)

2) Implement a range of new SMWQueryPrinter classes, one for each existing
type, but outputting the wikitext equivalents of the raw HTML.  So
SMWWikiTablePrinter would correspond to SMWTablePrinter, etc.

I'm heavily leaning towards the latter, but because it requires more code,
I am again faced with a few options:

1) Duplicate whatever I need to get the job done - for example a new
SMWInlineQueries class (SMWInlineWikiQueries) that inherits from the
original, but with a "getWikiResult" method.  This option requires no core
SMW changes, but results in duplicate code that would have to be kept in
sync with newer SMW releases (dirty hack)

2) Add hooks into the SMW core to reduce duplication, but still keep the
functionality separate.  An example hook would be at the end of
"getHTMLResult" - right after the "switch($this->mFormat)" block.  Something
like :

wgRunHooks("SMWInlineQueryGetHTMLResultBeforePrint", array( &$this,
&$printer, &$sq ));

Then anyone could plug any printer they wanted in, no questions asked.
This option requires minimal acceptance by the community as the patches
would be only a few lines.

3) Actually contribute all this work directly into the SMW core (most
elegant solution, but requires buy-in from the community).

So, dear community, what would you have me do?  One way or another, I will
have my {{#ask}} function, as I need it for my own site, and I plan to
release the code OSS. Is it worth trying to integrate this with the SMW
core?

Thank you for considering this - and thanks in advance for your replies!

-- Jim R. Wilson (jimbojw)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] InlineQueryParserFunction

2007-05-18 Thread Jim Wilson

Hi all,

I'm currently working on an InlineQuery Parser Function called {{#ask}}

So this: [[friend of::*]]

Becomes this: {{#ask:format=ul|[[friend of::*]]}}

I thought I was done, having basically written a wrapper around  that
simply uses the Parser Function interface instead of an extension tag.
Unfortunately this will not work as a general purpose solution since the
output of  is raw HTML, not Wikitext.

So, it's not going to be as easy as I'd hoped. :(   However, there are at
least two solutions:

1) Continue to wrap  and parse the resultant HTML back to wikitext
(dirty, dirty hack, but requires no core changes and no core functionality
duplication)

2) Implement a range of new SMWQueryPrinter classes, one for each existing
type, but outputting the wikitext equivalents of the raw HTML.  So
SMWWikiTablePrinter would correspond to SMWTablePrinter, etc.

I'm heavily leaning towards the latter, but because it requires more code, I
am again faced with a few options:

1) Duplicate whatever I need to get the job done - for example a new
SMWInlineQueries class (SMWInlineWikiQueries) that inherits from the
original, but with a "getWikiResult" method.  This option requires no core
SMW changes, but results in duplicate code that would have to be kept in
sync with newer SMW releases (dirty hack)

2) Add hooks into the SMW core to reduce duplication, but still keep the
functionality separate.  An example hook would be at the end of
"getHTMLResult" - right after the "switch($this->mFormat)" block.  Something
like :

wgRunHooks("SMWInlineQueryGetHTMLResultBeforePrint", array( &$this,
&$printer, &$sq ));

Then anyone could plug any printer they wanted in, no questions asked.  This
option requires minimal acceptance by the community as the patches would be
only a few lines.

3) Actually contribute all this work directly into the SMW core (most
elegant solution, but requires buy-in from the community).

So, dear community, what would you have me do?  One way or another, I will
have my {{#ask}} function, as I need it for my own site, and I plan to
release the code OSS. Is it worth trying to integrate this with the SMW
core?

Thank you for considering this - and thanks in advance for your replies!

-- Jim R. Wilson (jimbojw)
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] Reflexive results?

2007-05-17 Thread Jim Wilson

Hi SMW Devs,

Quick question: is there a way to get a list of all articles that meet a
reflexive criteria?

For example, I've got a relation called "friend of", and I know how to do
these types of queries:

[[User:Whoever]][[friend of::*]] - This will return all articles
that User:Whoever is a "friend of"

[[friend of::User:Whoever]] - This will return all articles that
are "friends of" User:Whoever

Is there a way to get the intersection of these two sets?  Meaning, everyone
who is both "friend of" User:Whoever, and who User:Whoever says they're
"friend of"?

Thanks in advance for your help - I really appreciate it.

And if the answer is "no, there's no pure SMW way to do that", that's fine
too - I can find another solution.  I just don't want to waste my time
looking for one if SMW can get the job done on its own.

Thanks!

-- Jim R. Wilson (jimbojw)
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Ask parser function?

2007-05-15 Thread Jim Wilson

Did anyone on the list receive this question?  I thought it would be an easy
'yes' or 'no'  - Thanks in advance.

-- Jim

On 5/14/07, Jim Wilson <[EMAIL PROTECTED]> wrote:


Is there an equivalent to  but as a parser function?  Akin to
{{#ask}}?

Thanks in advance.

-- Jim R. Wilson (jimbojw)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] Ask parser function?

2007-05-14 Thread Jim Wilson

Is there an equivalent to  but as a parser function?  Akin to {{#ask}}?

Thanks in advance.

-- Jim R. Wilson (jimbojw)
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] MF, to use your new, custom theme name and to point to the new locations for the theme files.

2007-05-07 Thread Jim Wilson

Probably a good idea to ban this account

On 5/7/07, Nannie <[EMAIL PROTECTED]> wrote:


The cream of the crop for 2007 - GET IN EARLY! DSDI IS SET TO ROCK YOUR
PORTFOLIO!

DSI Direct Sales, Inc.
Symbol: DSDI
Price: $0.05

There is a MASSIVE PROMOTION underway this weekend! This is hot, read
the news and get on DSDI first thing Monday!

The application you build in this tutorial simulates a real-world
application in which users can rate an item. Because the application
includes more than one item to rate, you use Map objects to hold the
data.
) next to the Rendered HTML attribute in the JSF section of the
component?
Thanks a lot, Andras.
The page also shows the average and user ratings in separate instances.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel