On Sonntag, 8. Juni 2008, Mov GP 0 wrote:
> Hi,
> from my subjective view the '.' is more easily to use and finer to
> read. But I support the technical standpoint that '->' will less
> likely result in the need for escape-techniques.
>
> Anyway, the escaping might get archived using '[[ ]]'. Example:
>
> {{#ask: [[ instance of::[[.NET language]] ]]}}
Escaping will probably be simply done by using initial whitespace, i.e.
{{#ask: [[ my.strange.property::Test]] }}
would really look for pages with property "my.strange.property". Besides that,
initial ":" could work like in MediaWiki to make a whole [[...]] be
interpreted as a single page name, i.e.
{{#ask: [[:my.strange.property::Test]] }}
selects the page entitled "my.strange.property::Test" as the only query result
(e.g. to print some of its property values).
(Neither of these is currently implemented, though ":" works with annotations
in the above way, and " " is used to escape property values that start with
things like ">".)
So I hope that escaping will not be a problem, even in the rare case where it
is really needed. The above case can always be written as
{{#ask: [[instance of::.NET language]]}}
since the . would not have a special meaning there anyway (not being part of a
property name but of a value).
>
> btw: direct calculating with values would be still fine:
>
> The [[radius]] of the Sun is {{#expr: {{#ask: Sun.Diameter}} / 2}}.
To me that seems to be a little confusing. Here "Sun" would be a page title,
and Diameter would be a property, while the above examples have only
properties joined with ".". Moreover, the property Diameter here is probably
intended as a printout statement, i.e. the query you would want to express is
{{#ask: [[Sun]] | ?Diameter | headers=hide}}
It has been pointed out to me that such queries should be simpler in syntax,
yet the ?-notation provides important features like a syntax for selecting
the output unit: {{#ask: [[Sun]] | ?Diameter#km | headers=hide}}.
Maybe we should have a new parser function that simplifies queries of this
shape, with a syntax like {{#show: Sun | ?Diameter}}. It would otherwise work
like ask (with the same parameters), but allowing only one page name as
a "query", and assuming empty property labels by default. Useful or too much
new syntax?
Regards,
Markus
>
> On Sun, Jun 8, 2008 at 3:45 PM, Markus Krötzsch
>
> <[EMAIL PROTECTED]> wrote:
> > On Freitag, 6. Juni 2008, Sergey Chernyshev wrote:
> >> Can I suggest to use '->' instead of dots - this will make it much less
> >> probable to have in Property names, but still reasonable as syntax.
> >
> > I though about that one too, but I was not sure if it is preferred
> > internationally. Would the right-to-left languages be OK with that too
> > (it would of course be right-to-left as well, but still)? Do you think
> > there could ever be name clashes on "."? (Is there anyone who ever used a
> > "." within a property name?) I can do both ... whatever most users
> > prefer.
> >
> > Here is again the new proposal in comparison to the old one:
> >
> > {{#ask: [[works at->located in->population::>1000000]] }}
> >
> > Old:
> >
> > {{#ask: [[works at.located in.population::>1000000]] }}
> >
> > (Personally, I find the old slightly more readable, maybe because the .
> > is smaller and just one symbol).
> >
> > -- Markus
> >
> >> On Fri, Jun 6, 2008 at 6:02 AM, Markus Krötzsch <
> >>
> >> [EMAIL PROTECTED]> wrote:
> >> > Hi all,
> >> >
> >> > I have a proposal for a simplification in #ask query syntax that I
> >> > would like
> >> > to get some feedback on.
> >> >
> >> > If you currently ask for property chains, you need something like the
> >> > following:
> >> >
> >> > {{#ask: [[works at::<q>[[located
> >> > in::<q>[[population::>1000000]]</q>]]</q>]]}}
> >> >
> >> > to find someone working at an organisation located in a place with
> >> > more than
> >> > 1000000 inhabitants. The many [[ and <q> are sure annoying.
> >> >
> >> > My proposal is to instead allow writing
> >> >
> >> > {{#ask: [[works at.located in.population::>1000000]] }}
> >> >
> >> > with exactly the same interpretation as above.
> >> >
> >> > Effects:
> >> > * "." in property names become problematic (though some escape can be
> >> > provided
> >> > to allow them),
> >> > * the syntax becomes shorter, and maybe also more readable.
> >> >
> >> > Would that be an improvement? Other comments? (There is also another
> >> > issue regarding the syntax with <q>, but I will have to check what can
> >> > be done there before proposing alternatives.)
> >> >
> >> > Cheers
> >> >
> >> > Markus
> >> >
> >> > --
> >> > Markus Krötzsch
> >> > Semantic MediaWiki http://semantic-mediawiki.org
> >> > http://korrekt.org [EMAIL PROTECTED]
> >> >
> >> > ----------------------------------------------------------------------
> >> >--- Check out the new SourceForge.net Marketplace.
> >> > It's the best place to buy or sell services for
> >> > just about anything Open Source.
> >> > http://sourceforge.net/services/buy/index.php
> >> > _______________________________________________
> >> > Semediawiki-devel mailing list
> >> > [email protected]
> >> > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
> >
> > --
> > Markus Krötzsch
> > Semantic MediaWiki http://semantic-mediawiki.org
> > http://korrekt.org [EMAIL PROTECTED]
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://sourceforge.net/services/buy/index.php
> > _______________________________________________
> > Semediawiki-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
--
Markus Krötzsch
Semantic MediaWiki http://semantic-mediawiki.org
http://korrekt.org [EMAIL PROTECTED]
--
Markus Krötzsch
Semantic MediaWiki http://semantic-mediawiki.org
http://korrekt.org [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ Semediawiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
