W3C home > Mailing lists > Public > public-cwm-talk@w3.org > October to December 2009

Re: working on "A Model of Authority in the Web" (str:search and str:scrape)

From: <jos.deroo@agfa.com>
Date: Fri, 18 Dec 2009 19:41:29 +0100
To: connolly@w3.org
Cc: Jonathan Rees <jar@creativecommons.org>, public-cwm-talk@w3.org, public-cwm-talk-request@w3.org
Message-ID: <OF1DB0EBD2.C3F90F57-ONC1257690.00640DAB-C1257690.0066AD9F@agfa.com>
Dan Connolly wrote:
[...]
> On Fri, 2009-12-18 at 16:10 +0100, jos.deroo@agfa.com wrote:
> [...]
>> I also had to add the string search builtin in Eye and I see that it 
>> is called "scrape" in http://www.w3.org/2000/10/swap/doc/CwmBuiltins 
>
> search and scrape aren't quite the same; scrape's range is a string,
> while search's range is a list of strings.
>
> I neglected to document search when I coded it up.

Thanks Dan and it is clear now.
I implemented both in 
http://eulersharp.sourceforge.net/2006/02swap/euler.yap
version_info('$Id: euler.yap 3220 2009-12-18 18:10:00Z josd $').
plus added them in 
http://eulersharp.sourceforge.net/2003/03swap/euler-builtins.n3

Both cwm and eye now agree that

@prefix str: <http://www.w3.org/2000/10/swap/string#>.
("http://example.org/1995/manifesto" "http://([^/]+)/") str:scrape 
"example.org".
("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape 
"example.org".
("http://example.org/1995/manifesto" "http://([^/]+)/") str:search 
("example.org").
("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:search 
("example.org" "1995").
("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)/([^/]+)") 
str:search ("example.org" "1995" "manifesto").
("http://example.org/1995/manifesto/a/b/c/d/e/f/g/h/i" "http://(
[^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)") 
str:search ("example.org" "1995" "manifesto" "a" "b" "c" "d" "e" "f" "g").


Kind regards,

Jos De Roo | Agfa HealthCare
Senior Researcher | HE/Advanced Clinical Applications Research
T  +32 3444 7618
 http://www.agfa.com/w3c/jdroo/

Quadrat NV, Kortrijksesteenweg 157, 9830 Sint-Martens-Latem, Belgium
http://www.agfa.com/healthcare
Received on Friday, 18 December 2009 18:42:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:01:06 UTC