W3C Team

Personal Web Sites

On “Where is XML Going?”

A few days ago Kurt Cagle posted a blog entitled “Where is XML Going”. He lists a number technologies and trends of interest in the XML development community. There is nothing in his post I would disagree with (well… I am always a bit cautious when RDF is presented as part of XML; this is [...]

03 Mar 2007 by Ivan Herman's blog

Shivkumar Sharma

Back from India today. By luck, I met there a former colleague who lives now in Bangalore. He and his friend gave me some Indian music. If you do not know this type of music, or if you know only the name of Ravi Shankar (which is usually the case of my generation…), remember another [...]

25 Feb 2007 by Ivan Herman's blog

Semantic Web and Digital Libraries Conference

I just came back from a conference on Semantic Web and Digital Libraries (ICSD 2007) in Bangalore, India. Incidentally, this was also the first international event on Semantic Web in India altogether. The idea of bringing together two communities that so clearly have things to say to one another is great. Obviously, it is also difficult; [...]

25 Feb 2007 by Ivan Herman's blog

Dublin Core abstract model

The DCMI has published a draft for public review for an updated version of Dublin Core Abstract Model. From a Semantic Web point of view, the most important point about the new version is to have a clear association to RDF and RDFS terms as well as an alignment of the two models. For a [...]

13 Feb 2007 by Ivan Herman's blog

Yahoo! pipes and visualization…

There has been a whole series of blogs lately on a new system published by Yahoo!, called Yahoo! pipes. Tim O’Reilly called it a “milestone in the history of the Internet” (which I find a little bit overdriven, but that may be only me). The system gives the user a cute interface whereby users can [...]

09 Feb 2007 by Ivan Herman's blog

9 Feb 2007

Social standards and coding fugues

I got Cryptonomicon for Christmas; chalk one up for Amazon wish-lists. It walks the line between geek culture and popular culture in a way that makes me want people close to me to read it so they'll understand me a little better. This bit from p. 819 struck a chord...

"Who framed me, then?" Randy asks, kind of rhetorically. He was just in the middle of doing some pretty cool C++ coding when he got yanked out of his cell to have this surprise encounter with the Dentist, and is surprising himself with just how bored and irritated he is. He has reverted, in other words, back into a pure balls-to-the-wall nerdisim rivaled only by his early game-coding days back in Seattle. The sheer depth and involution of the current nerdism binge would be hard to convey to anyone. Intellectually, he is juggling half a dozen lit torches, Ming vases, live puppies, and running chainsaws. In this frame of mind he cannot bring himself to give a shit about the fact that this incredibly powerful billionaire has gone to a lot of trouble to come and F2F with him. And so he asks the above question as nothing more than a perfunctory guesture, the subtext being I wish you would go away but minimal standards of social decency dictate that I should say something.

In other news, Advogato does foaf, the Semantic Web social networking standard. Rock on, robogato!

09 Feb 2007 by Advogato blog for connolly

How I geotag my photos

Several times recently I’ve needed to explain how I add gps information to my photos. I thought it would help to document it here. I’m not saying this is the best way to do things, but it seems to work reasonably well. If your browser window isn’t wide enough to show the right side of [...]

06 Feb 2007 by ishida >> blog

A design for web content labels built from GRDDL and rules

In #swig discussion, Tim mentioned he did some writing on labels and rules and OWL which prompted me to flesh out some related ideas I had. The result is a Makefile and four tests with example labels. One of them is:

All resources on example.com are accessible for all users and meet WAI AA guidelines except those on visual.example.com which are not suitable for users with impaired vision.

I picked an XML syntax out of the air and wrote visaa.lbl:

<label
xmlns="http://www.w3.org/2007/01/lbl22/label"
xmlns:mobilebp="http://www.w3.org/2007/01/lbl22/mobilebp@@#"
xmlns:wai="http://www.w3.org/2007/01/lbl22/wai@@#"
>
<scope>
<domain>example.com</domain>
<except>
<domain>visual.example.com</domain>
</except>
</scope>
<audience>
<wai:AAuser />
</audience>
</label>

And then in testdata.ttl we have:

<http://example.com/pg1simple> a webarch:InformationResource.
<http://visual.example.com/pg2needsVision> a
webarch:InformationResource.
:charlene a wai:AAuser.

Then we run the test thusly...

$ make visaa_test.ttl
xsltproc --output visaa.rdf label2rdf.xsl visaa.lbl
python ../../../2000/10/swap/cwm.py visaa.rdf lblrules.n3 owlAx.n3
testdata.ttl \
--think --filter=findlabels.n3 --n3 >visaa_test.ttl

and indeed, it concludes:

    <http://example.com/pg1simple>     lt:suitableFor :charlene .

but doesn't conclude that pg2needsVision is OK for charlene.

The .lbl syntax is RDF data via GRDDL and label2rdf.xsl. Then owlAx.n3 is rules that derive from the RDFS and OWL specs; i.e. stuff that's already standard. As Tim wrote, A label is a fairly direct use of OWL restrictions. This is very much the sort of thing OWL is designed for. Only the lblrules.n3 bit goes beyond what's standardized, and it's written in the N3 Rules subset of N3, which, assuming a few built-ins, maps pretty neatly to recent RIF designs.

A recent item from Bijan notes a SPARQL-rules design by Axel; I wonder if these rules fit in that design too. I hope to take a look soonish.

25 Jan 2007 by connolly's blog

Integrating Wikipedia and SW

Chris Bizer and friends have recently announced their dbpedia site, which provides a mapping of the structural content of Wikipedia in RDF. For example, the categorization data of the Wikipedia entry on the Indian writer Amitav Ghosh can be seen as: raw RDF/XML, via a Sparql interface via a simple HTML dump of the same data, or [...]

24 Jan 2007 by Ivan Herman's blog

Agnes, 17:06

Roman photo, sur les traces d'Agnes.

17:06
building
issue de secours
escaliers
chambre, porte entrouverte
mouchoirs
Issue de Secours
sac

14 Jan 2007 by Mes deux neurones

BibTeX in RDF

I just blogged elsewhere on BibSonomy, an alternative to del.icio.us that also includes bibliographical references. The core terminology used by the system (for bibliographical information) is based on BibTeX but entries can also be dumped to other formats. See, for example, a portion of my references in BibTeX or RDF. However… which RDF terminology for [...]

13 Jan 2007 by Ivan Herman's blog

BibSonomy

I colleague in the SWEO group (I think it was Paul Miller, I am not sure) drew my attention to the BibSonomy service. The service is pretty much along the same lines as del.icio.us. One can have bookmarks, share it with others, add tags, etc, etc. So why bother? Well, the nice feature of BibSonomy is [...]

13 Jan 2007 by Ivan Herman's blog

BibSonomy

I colleague in the SWEO group (I think it was Paul Miller, I am not sure) drew my attention to the BibSonomy service. The service is pretty much along the same lines as del.icio.us. One can have bookmarks, share it with others, add tags, etc, etc. So why bother? Well, the nice feature of BibSonomy is [...]

13 Jan 2007 by Ivan Herman's blog

New ESW page: Converters to RDF

A new page has just been added to ESW Wiki: list of converters to RDF. Clearly necessary and useful… and having it on the Wiki makes it possible to keep it up-to-date more easily! B.t.w., the SWEO group will create a separate task force on Resource Gathering which will look at pages like this one. Still [...]

09 Jan 2007 by Ivan Herman's blog

Changing to WordPress

I used blosxom for a long time as a blogging software. It was quite all right but, I must admit, I got a little bit bored to keep it up myself if I had to do any change. So I decided to become lazy and switch to WordPress… I tried to do my best to [...]

07 Jan 2007 by Ivan Herman's blog

2006 - Year in review

A review of my life in 2006, or at least the bits that I want to share.

Job of the Year

(or, the thing I do to get paid so I can have a life)

My summary would be that work generally sucked in 2006. Since I don't write about work I can now remember the plenty of fun non-work things that happened during the year.

Travel

(or, how lucky I am to get paid to visit all these nice places)

I spent more nights away from home this year than any other, including a 5 week trip and a 7 week trip. There was a 12 week period where I was travelling for 9 of the 12 weeks.

Having said that, I probably travelled less distance than the last few years, but still enough to make me feel incredibly guilty about carbon emissions. I went on less trips, and spent more time in the places I visited. Great Circle Mapper has a diagram of the 258,880km I flew.

I added four new countries to my visited list: Morocco, China, The Netherlands and the Czech Republic. Five if you cheat and count Scotland.

Beijing was a stand out. I loved everything, from the sites like the Great Wall and the Forbidden City to just being amongst millions of people. Kids would stare and ask to take a photograph with you. I assume this was because they were visiting Beijing from somewhere more remote and it was the first time they'd seen foreigners. Or it could be that I'm a freak and they collect photos of freaks.

Morocco was also great - the most exotic place I've been to. I was annoyed to not have a camera, but that meant I spent time experiencing the place rather than taking photos of the experiences. I got terrible food poisoning and fell down a flight of stairs in a carpet shop but neither spoilt the trip in any way.

Movies of the Year

(or, how I can bore you by rambling on about films)

Warning: there might be some spoilers in here.

Overall I was very disappointed with movies of 2006. I didn't see anything that I would call brilliant. The highlights of the year for me were comedies:

Borat was the funniest movie I've ever seen, even though it was quite repetitive and not as funny as watching a DVD with highlights from "Da Ali G show". I was confused by the arguments and discussion about the movie being a comment on society. To me it was just a straightforward, but excellent, comedy. I didn't suspect Sascha Baron Cohen of anything other than trying to make people laugh by saying/doing the unexpected (and that's really what comedy is).

Plain and simple, Talledega Nights wakes up in the morning and pisses excellence. I was so impressed by how fast the movie started, with rapid-fire laughs for at least 30 minutes. The highlight was the dinner scene with Ricky saying grace (to the omnipotent Christmas baby Jesus) while his sons abuse their grandfather and his friend is complimenting his wife's physical assets. And Sascha Baron Cohen was fantastic as Jean Girard from "Formula uuhnn". Shake and bake!

Other good comedies: Little Miss Sunshine and Kenny (although I'm not sure it would be as amusing to a non-Aussie).

I had a great time with the singing and dancing penguins of Happy Feet. The story itself wasn't great, and I was very annoyed to hear Nicole Kidman and Hugh Jackman use American accents. I also got the impression that Animal Logic were showing off some fancy digital effects when they were not really required for the story, something I don't notice Pixar doing. But the dancing penguins made up for everything, and the soundtrack rocked.

The blockbusters of 2006 were fairly disappointing. MI3 was just average (and had an overly cheesy ending). Pirates of the Caribbean was fun but ridiculous. Superman Returns was painfully boring and lacked anyone with charisma (even Kevin Spacey bombed). XMen 3 was nowhere near as good as the excellent XMen 2. Poseidon was as bad as I expected it to be (the wave roared!!).

I spent some time thinking about The Illusionist and The Prestige, another case of two movies with very similar subjects releasing in the same year. While I enjoyed them both, I was ultimately disappointed by The Prestige. Where The Illusionist created a world which seemed to contain real magic until you discovered it was all a trick, The Prestige created a world where everything was trick until you discovered there was real magic. I'm always going to find it easier to get involved in a movie that is believable rather than one that relies on the impossible (and, in this case, ridiculous). I guess the novel's author had a good reason for this, and the filmmakers can't predict such a similar movie being released within months. I'm not really complaining here - both films where very enjoyable, looked fantastic and were well acted.

(FYI: I used the word "tricks" instead of "illusions" because I didn't want to confuse it with the title of the film. I know that Gob says tricks are what a whore does for candy. I expect a call from the magicians' alliance).

Casino Royale was my pleasant surprise for the year. I had concluded that Bond movies were going to continue being increasingly pathetic, but this one broke many of the traditions:

When the movie ended I immediately wanted to see more. I wanted to know what happens to Bond from that point on. I hope they continue the series in the same manner. I'm a little worried that this movie, as a prequel, was supposed to create the Bond we knew from previous films (and it does set it up that way) but it would be a terrible shame to destroy such an interesting character.

Lastly, here's the films from 2006 that I suggest were crap: Firewall and Flightplan (both examples of criminals going using insanely complicated methods to carry out quite straight-forward crimes), the remake of the Pink Panther (why? why? was it attempting to be Zoolander-style funny) and The Chronicles of Narnia.

Music of the Year

(or, stuff I listened to that I thought was better than the other stuff I listened to)

A pretty mainstream selection of favourite music this year:

Just so I'm not being completely boring, here's an album that isn't popular with the in-crowd: Justine Clarke - I like to sing. It's meant for kids (Justine is from Play School) and it is great for singing along.

Wii of the Year

(or, I'd love to be a teenager again)

While I do own a Nintendo DS to keep me entertained while travelling, I thought my gamer days were well behind me. I have never been interested in getting an XBox or Playstation and I haven't played a real computer game in many years.

But then came the Wii. It just looked so fun - I couldn't resist. I loved that it was being promoted to non-gamers and that it wasn't trying to compete in the bigger, better, faster world of Sony and Microsoft. As the Wii sold out immediately and I hadn't pre-ordered, I was very lucky to find one a few days after release under the counter at Big W.

I'm enjoying it so much I can't believe it.

I'm even playing Zelda! Yes, I'm pretending to be a elf-like boy warrior who is saving the world from the powers of darkness, and supposedly winning the Princess's heart in the process. It has been a blast. Games are so much more impressive nowadays in terms of story and complexity. Sure, the graphics get better but that's mostly fluff. These games are becoming more like immersive books that stretch your brain muscles.

The entire branding of the Wii is perfect. Everything looks beautiful, from the accessories and their packaging to the actual screen interface. It's almost so good that you don't notice it - everything just feels right. You don't usually get such a completely uniform design aesthetic outside of Apple.

Television of the Year

(or, it turns out you won't get square eyes if you watch too much)

I relapsed into TV addiction in 2006. I'm not quite as bad as I was in school, but I did watch a lot. There are two main reasons:

I use those two reasons to justify not trying to cure the addiction.

I've been planning to write about my favourite TV shows for a while, so I'll just mention the good shows I discovered in 2006.

Veronica Mars is my favourite show at the moment. It's a high-school drama done right with a fantastically sassy and intelligent lead character. It's not pretending to be anything more than it is, just lots of fun. I caught up on the first two seasons early in the year and am enjoying the third season that is in progress now. A special pleasure has been the consistent references to The Big Lebowski throughout the season.

House is similar. It's been around for a while but I only found it in 2006. He's by far the best character on television, and I'm almost decided on making Greg House my personal hero. I wish I could be him (or at least as smart, arrogant, funny and unfriendly).

Dog of the Year

(or, yet another addition to the Doolittle family)

My home welcomed Chase in 2006. He was born on the 6th of the 6th in 2006 and thus narrowly avoided being called Damien. Instead, he's named after a character from the TV show House.

NooNoo and Bess quickly sorted the little doofus out, but poor Snow gets constantly harassed for play by Chase (Snow is his half-sister). Chase's simple puppy brain hasn't yet learnt the lesson from Pounce about who is the boss of the animals.

Podcasts of the Year

(or, if I didn't have these I'd have to watch the in-flight movies)

My favourite podcasts where mostly from NPR, with the highlight being "Wait Wait, Don't Tell Me". I guess some people might call these time-shifted radio rather than podcasts.

My best "real" podcast was the Daily Podcast from Slate by Andy Bowers. With the exception of the political gabfests I found every topic interesting.

Other favourites: Ebert and Roeper, lots of Radio National, Enough Rope with Andrew Denton and the Ruby on Rails podcasts (nerd alert).

I tried to listen to some less-polished podcasts but everywhere I went I found morons rambling on or filling the space with annoying music tracks. I wanted information, not some fool trying to be funny. And if I wanted music I'd listen to my music, given that the device I'm using is a music player. I've nearly given up on everything but the more professional podcasts. End of rant.

Fruit of the Year

(or, essential eating)

Easy: the banana. Due to the shortage in Australia bananas became yellow gold. I didn't realise how much I would miss my daily banana. Luckily the end of the year saw prices return to normal.

Gadget Purchase of the Year

(or, me wasting money again)

The 8G second generation black iPod nano, lovingly called Voldepod.

Sporting Moment of the Year

(or, me being proud of my country while watching a silly sport that I've never played)

I got completely swept up in the football World Cup, especially the performance of Australia, who hadn't been to the finals since they used a cow's stomach for a ball. For a game where nothing much happens 90% of the time it can be extremely nerve-wracking to watch. I might be the only person in Australia who thought that the penalty Italy were awarded in the last minute of the match was actually a penalty, but I still think Australia deserved to win.

What's fantastic is the whole tournament will be remembered for one thing, and it didn't involve any skill with a ball.

Holidays of the Year

(or, get me out of here!)

I spent a couple of weeks near the beach in Tilba and then the Christmas period on a friends farm in the middle of nowhere. (It wasn't really nowhere, but it felt like it to me). I loved both.

Lowlights of the Year

(or, bugger!)

Having my digital camera and 60G fourth generation iPod stolen from my luggage. I travelled through Morocco, Prague and parts of Spain without a camera. Bummer.

Lastly, I feature myself as a lowlight. While I spent a lot of time with my work-related friends I was a failure with my non-work friends, especially Tom, Craig and Rachel ("hi" if you read this). It's crazy to see people on the other side of the world more often than people 10 minutes away. I hope to change this in 2007.

05 Jan 2007 by Cuboidal

5 Jan 2007

Exchange 2000 Server requires a file name in the Content-type header. Q12: How does Exchange handle attachments? Microsoft Article 836555

I bet you can guess the rest of the story, but I hope to write it up later today.

#swig notes

05 Jan 2007 by Advogato blog for connolly

She's a witch and I have the proof (in N3)

A while back, somebody turned the Monty Python Burn the Witch sketch into an example resolution proof. Bijan and Kendall had some fun turning it into OWL.

I'm still finding bugs pretty regularly, but the cwm/n3 proof stuff is starting to mature; it works for a few PAW demo scenarios. Ralph asked me to characterize the set of problems it works for. I don't have a good handle on that, but this witch example seems to be in the set.

Transcribing the example resolution FOL KB to N3 is pretty straightforward; the original is preserved in the comments:


@prefix : <witch#>.
@keywords is, of, a.

#[1] BURNS(x) /\ WOMAN(x) => WITCH(x)

{ ?x a BURNS. ?x a WOMAN } => { ?x a WITCH }.

#[2] WOMAN(GIRL)
GIRL a WOMAN.

#[3] \forall x, ISMADEOFWOOD(x) => BURNS(x)
{ ?x a ISMADEOFWOOD. } => { ?x a BURNS. }.

#[4] \forall x, FLOATS(x) => ISMADEOFWOOD(x)
{ ?x a FLOATS } => { ?x a ISMADEOFWOOD }.

#[5] FLOATS(DUCK)

DUCK a FLOATS.

#[6] \forall x,y FLOATS(x) /\ SAMEWEIGHT(x,y) => FLOATS(y)

{ ?x a FLOATS. ?x SAMEWEIGHT ?y } => { ?y a FLOATS }.

# and, by experiment
# [7] SAMEWEIGHT(DUCK,GIRL)

DUCK SAMEWEIGHT GIRL.

Then we run cwm to generate the proof and then run the proof checker in report mode:

$ cwm.py witch.n3  --think --filter=witch-goal.n3  --why >witch-pf.n3
$ check.py --report witch-pf.n3 >witch-pf.txt

The report is plain text; I'll enrich it just a bit here. Note that in the N3 proof format, some formulas are elided. It makes some sense not to repeat the whole formula you get by parsing an input file, but I'm not sure why cwm elides results of rule application. It seems to give the relevant formula on the next line, at least:

  1. ...
    [by parsing <witch.n3>]

  2. :GIRL a :WOMAN .
    [by erasure from step 1]

  3. :DUCK :SAMEWEIGHT :GIRL .
    [by erasure from step 1]

  4. :DUCK a :FLOATS .
    [by erasure from step 1]

  5. @forAll :x, :y . { :x a wit:FLOATS; wit:SAMEWEIGHT :y . } log:implies {:y a wit:FLOATS . } .
    [by erasure from step 1]

  6. ...
    [by rule from step 5 applied to steps [3, 4]
    with bindings {'y': '<witch#GIRL>', 'x': '<witch#DUCK>'}]


  7. :GIRL a :FLOATS .
    [by erasure from step 6]

  8. @forAll :x . { :x a wit:FLOATS . } log:implies {:x a wit:ISMADEOFWOOD . } .
    [by erasure from step 1]

  9. ...
    [by rule from step 8 applied to steps [7]
    with bindings {'x': '<witch#GIRL>'}]


  10. :GIRL a :ISMADEOFWOOD .
    [by erasure from step 9]

  11. @forAll :x . { :x a wit:ISMADEOFWOOD . } log:implies {:x a wit:BURNS . } .
    [by erasure from step 1]

  12. ...
    [by rule from step 11 applied to steps [10]
    with bindings {'x': '<witch#GIRL>'}]

  13. :GIRL a :BURNS .
    [by erasure from step 12]

  14. @forAll witch:x . { witch:x a :BURNS, :WOMAN . } log:implies {witch:x a :WITCH . } .
    [by erasure from step 1]

  15. ...
    [by rule from step 14 applied to steps [2, 13]
    with bindings {'x': '<witch#GIRL>'}]


  16. :GIRL a :WITCH .
    [by erasure from step 15]


All the files are in the swap/test/reason directory: witch.n3, witch-goal.n3, witch-pf.n3, witch-pf.txt. Enjoy.

03 Jan 2007 by connolly's blog

Merci Infiniment !

12 avril 2000 - 31 décembre 2006, carnet Web Karl

Vous pouvez enlever le feed de vos agrégateur, il ne sera plus mis à jour. Merci de m'avoir lu jusque là. Les archives restent en lignes.

31 Dec 2006 by Karl - Le carnet Web

Du bonheur bleuté

Il y a quelques années, le 11 décembre 2000, dans un billet « HTML et les premiers navigateurs » sur Karl & Cow - The Boring Weblog qui était assez mal écrit sur les technologies Web et le HTML, j'insistais sur les conséquences de nos toutes premières décisions. Et je concluais par « Les premières fois sont très importantes. »

graffiti

代官山, 日本

Il y a toujours ce magnifique sentiment lorsque l'on explore de nouveaux territoires, cette excitation de chaque instant, cette envie permanente et folle de créer. C'est une belle aventure, un parfum de chèvrefeuille invitant à la libre pensée. La trajectoire du papillon, le bonheur unique du plaisir, le sourire au bout des doigts, les mots sont naïfs, les phrases sont jeunes.

Les choses se raffinent, se patinent et prennent le charme de l'ancien. C'est un vieux fauteuil écossais en cuir au coin du feu, c'est un chemin qui nous fait sourire car on y trouve du confort, c'est le parfum d'une table en bois couverte de cire d'abeille. La maturité nous apporte son lot de rides, son assurance tranquille et la tendresse de la maîtrise. Qu'il est doux cet instant de sérénité.

Être ébloui, s'extasier du quotidien, vivre passionnément le banal est le feu qui m'illumine. L'exploration des horizons lointains jamais ne cesse. La découverte est une invitation.

Du bonheur qui n'est que de l'anxiété différée. Du bonheur bleuté, d'une insubordination admirable, qui s'élance du plaisir, pulvérise le présent et toutes ses instances.

Feuillets d'Hypnos, 145, René Char

prise dans un mur

恵比寿, 日本

rêverie

30 Dec 2006 by Karl - Le carnet Web

Modelling HTTP cache configuration in the Semantic Web

The W3C Semantic Web Interest Group is considering URI best practices, whether to use LSIDs or HTTP URIs, etc. I ran into some of them at MIT last week. At first it sounded like they wanted some solution so general it would solve the only two hard things in Computer Science: cache invalidation and naming things , as Phil Karlton would say. But then we started talking about a pretty interesting approach: using the semantic web to model cache configuration. It has long been a thorn in my side that there is no standard/portable equivalent ot .htaccess files, no RDF schema for HTTP and MIME, etc.

At WWW9 in May 2000, I gave a talk on formalizing HTTP caching. Where I used larch there, I'd use RDF, OWL, and N3 rules, today. I made some progress in that direction in August 2000: An RDF Model for GET/PUT and Document Management.

Web Architecture: Protocols for State Distribution is a draft I worked on around 1996 to 1999 wihthout ever really finishing it.

I can't find Norm Walsh's item on wwwoffle config, but I did find his XML 2003 paper Caching in with Resolvers:

This paper discusses entity resolvers, caches, and other strategies for dealing with access to sporadically available resources. Our principle focus is on XML Catalogs and local proxy caches. We’ll also consider in passing the ongoing debate of names and addresses, most often arising in the context of URNs vs. URLs.

In Nov 2003 I worked on Web Architecture Illustrated with RDF diagramming tools.

The tabulator, as it's doing HTTP, propagates stuff like content type, last modified, etc. from javascript into its RDF store. Meanwhile, the accessability evaluation and repair folks just released HTTP Vocabulary in RDF. I haven't managed to compare the tabulator's vocabulary with that one yet. I hope somebody does soon.

And while we're doing this little survey, check out the Uri Template stuff by Joe Gregorio and company. I haven't taken a very close look yet, but I suspect it'll be useful for various problems, if not this one in particular.

23 Dec 2006 by connolly's blog

8 Dec 2006

appscript and office automation

My wife does office work for a local professional and whenever I see her doing work that I know the computer could do for her, I chip in. The end-of-the-month scramble is a clear case: they take client reports, print them out and then manually sort them by officer and fax them out.

Surely I could do better with faxaway, I thought. The only question was: since the reports are in MS Word and the database is in FileMaker Pro, all on a Mac laptop, how much would I have to sell my soul to Apple and Microsoft in the process?

appscript let me drive the process from python. I did quite a bit of HyperTalk programming, but somehow I'm still a bit mystified by AppleScript: which are the language keywords and which are the application vocabulary? The FileMakerAppscriptingOverview made it trivial to crib bits like:

    fm = app("FileMaker Pro")
    if not fm.databases[db].exists():
        fm.open(FSSpec(path % db))
        return fm.databases[db]

FSSPec is deprecated in the Carbon docs, but I never did figure out a replacement.

appscript's integration of AppleScript references into python with its and con is particularly cute, but I pulled a bit of hair out before I figured out how to use it:

def officerFax(db, oName, cName):
    # hmm... I'm not sure why this str() is necessary...
    officers = db.tables['officers'].records[
            its.fields['name'].cellValue == str(oName)]

If FileMaker has a way to use real SQL, I can't find it. Plus, we're running a PowerPC version on an intel MacBook with only 0.5GB of RAM. Emulating FileMaker and MS Word is using a lot of RAM, I suspect. I looked into open source alternatives and found that OpenOffice's Base looks quite capable, and I'm sure oowriter would do the job as an MS Word replacement. I hope the python-uno bridge works on OS X so that I can switch the whole operation over one of these moths.

I did pay a price for not doing it The Apple Way. Technical Q&A QA1018 Using AppleScript to send an email with an attachment shows exactly how to attach a report to a mail message and send it to faxaway. I was able to create and address a mail message from python/appscript, but making the attachment stumped me. After verifying that the AppleScript example does work as advertised, I gave up and wrote a separate mailfaxes.py program that uses python's email and smtplib modules and skips Mail.app altogether. I had to be a little careful since the laptop runs python2.3 and the email modules have been rearranged a bit in python 2.4 and 2.5, but it was reasonably straightforward.

Driving MS Word was, predicably, even klunkier:

TMP="fax_job.htm"
def asHTML(w, dirpath, fname):
    """save current doc as HTML
    """
    w.do_Visual_Basic('ActiveDocument.SaveAs FileName:="%s",'
        ' FileFormat:= wdFormatHTML,'
        ' HTMLDisplayOnlyOutput:=True' % (TMP,))

Office X has an AppleScript interface, but it's not as rich as the Visual Basic API. I got Word to save as HTML (for processing with BeautifulSoup) but I never did figure out how to tell MS Word which directory to put it in. I wrote a posix2mac() routine to convert /posix/paths to ::mac:paths as used in AppleScript but that didn't help; I ended up with a hard-coded kludge.

Switching syntaxes with do_Visual_Basic is a little bit painful, but when it goes bad the diagnostics are pretty good. "ActivePrinter is read-only on the Macintosh," it said, where w.active_printer = p had just failed silently. The modern VB.NET PrintOut documentation isn't hard to find, but it's a little more tricky to find the 2002 PrintOut docs that are more relevant. I never did get PrintToFile working, nor did I find a way to script the PDF option in Apple's print dialogs. Thank goodness for the Appscript, Word and PDF clue which pointed me to CUPS-PDF for Mac OS X. It worked as advertised, though writing code to wait for a new PDF document in ~/Desktop/cups-pdf/ was tricky; we sent a number of reports to the wrong place due to a timing bug.

The Python Bindings for Quartz 2D rock; composing fax cover pages couldn't be easier than this:

htmltxt = coverHTML(oName, fax, subject, pages)
ctx.drawHTMLTextInRect(
        CG.CGDataProviderCreateWithString(htmltxt),
        pageRect.inset(72, 72))

and concatenating several PDFs into one was similarly straightforward. It doesn't hurt that faxing is Apple's example application.

For reference:

hh-fax2$ hg log --template '#rev#:#node|short#
#date|shortdate# #desc|firstline|strip#\n'
11:7b497e5881d8 2006-12-07 fixed nasty timing bug with PDF
virtual printer
10:5fbd62cf7025 2006-12-07 fixed SMTP details
9:adbc7966d42d 2006-12-07 back to faxaway
8:89f2688b85fc 2006-12-07 smtp host arg
7:eb4eba0ed22c 2006-12-07 mailfaxes.py starting to work
6:c317d0cb9956 2006-12-07 prepares one PDF doc per officer
5:fe8a79a7ed9f 2006-12-06 faxjob.py iterates over reports
and looks up fax numbers
4:52f42112c287 2006-12-06 better diagnostics
3:862514804543 2006-12-04 officer update mostly working
2:61dfc88ab652 2006-12-04 connecting to FM from py works
1:a1f813e53e79 2006-12-02 HTML/CSS page break test
0:aa2d0cc8a7e9 2006-12-02 save as html, doc export working

Tags: python office mac

09 Dec 2006 by Advogato blog for connolly

Off-line browsing on a mobile device

I installed the latest version of Opera Mini on my Treo 650 PDA, inspired by all the pretty good feedback I read here and there; unfortunately, I never got it to run properly, as it seems to insist on crashing (and on making my palm reboot) as soon as I'm ...

30 Nov 2006 by Don't call me DOM

A new Basketball season brings a new episode in the personal information disaster

Basketball season is here. Time to copy my son's schedule to my PDA. The organization that runs the league has their schedules online. (yay!) in HTML. (yay!). But with events separated by all <br>s rather than enclosed in elements. (whimper). Even after running it thru tidy, it looks like:

<br />
<b>Event Date:</b> Wednesday, 11/15/2006<br>
<b>Start Time:</b> 8:15<br />
<b>End Time:</b> 9:30<br />
...
<br />
<b>Event Date:</b> Wednesday, 11/8/2006<br />
<b>Start Time:</b> 8:15<br />

So much for XSLT. Time for a nasty perl hack.

Or maybe not. Between my no more undocumented, untested code new year's resolution and the maturity of the python libraries, my usual doctest-driven development worked fine; I was able to generate JSON-shaped structures without hitting that oh screw it; I'll just use perl point; the gist of the code is:

def main(argv):
    dataf, tplf = argv[1], argv[2]
    tpl = kid.Template(file=tplf)
    tpl.events = eachEvent(file(dataf))

    for s in tpl.generate(output='xml', encoding='utf-8'):
        sys.stdout.write(s)

def eachEvent(lines):
    """turn an iterator over lines into an iterator over events
    """
    for l in lines:
        if 'Last Name' in l:
            surname = findName(l)
            e = mkobj("practice", "Practice w/%s" % surname)
        elif 'Event Date' in l:
            if 'dtstart' in e:
                yield e
                e = mkobj("practice", "Practice w/%s" % surname)
            e['date'] = findDate(l)
        elif 'Start Time' in l:
            e['dtstart'] = e['date'] + "T" + findTime(l)
        elif 'End Time' in l:
            e['dtend'] = e['date'] + "T" + findTime(l)

next = 0
def mkobj(pfx, summary):
    global next
    next += 1
    return {'id': "%s%d" % (pfx, next),
            'summary': summary,
            }

def findTime(s):
    """
    >>> findTime("<b>Start Time:</b> 8:15<br />")
    '20:15:00'
    >>> findTime("<b>End Time:</b> 9:30<br />")
    '21:30:00'
    """
    m = re.search(r"(\d+):(\d+)", s)
    hh, mm = int(m.group(1)), int(m.group(2))
    return "%02d:%02d:00" % (hh + 12, mm)

...

It uses my palmagent hackery: event-rdf.kid to produce RDF/XML which hipAgent.py can upload to my PDA. I also used the event.kid template to generate an hCalendar/XHTML version for archival purposes, though I didn't use that directly to feed my PDA.

The development took half an hour or so squeezed into this morning:

changeset:   5:7d455f25b0cc
user:        Dan Connolly http://www.w3.org/People/Connolly/
date:        Thu Nov 16 11:31:07 2006 -0600
summary:     id, seconds in time, etc.

changeset:   2:2b38765cec0f
user:        Dan Connolly http://www.w3.org/People/Connolly/
date:        Thu Nov 16 09:23:15 2006 -0600
summary:     finds date, dtstart, dtend, and location of each event

changeset:   1:e208314f21b2
user:        Dan Connolly http://www.w3.org/People/Connolly/
date:        Thu Nov 16 09:08:01 2006 -0600
summary:     finds dates of each event

16 Nov 2006 by connolly's blog

Examples of Mobile Web Best Practices conformant sites?

Mike ran a few Web sites through the Mobile Web Best Practices checker, and noted that: Here’s a few things to pay attention to: checking Nokia.mobi yields 50 errors Vodafone.mobi has 85 the .mobi site for dotMobi itself has 5 errors the output of Google’s mobile transcoder yields about 18 per page the validator seems to ...

13 Nov 2006 by Don't call me DOM

Upcoming talks on the Mobile Web Best Practices

I will be presenting the Mobile Web Best Practices twice in the upcoming few days: during the MWI Seminar in Paris on November 16; I'll have 20 minutes to give an overview of the principles behind the Best Practices, and where we're headed with mobileOK next Monday at 11am CET, I'll be ...

13 Nov 2006 by Don't call me DOM

Celebrating OWL interoperability and spec quality

In a Standards and Pseudo Standards item in July, Holger Knublauch gripes that SQL interoperability is still tricky after all these years, and UML is still shaking out bugs, while RDF and OWL are really solid. I hope GRDDL and SPARQL will get there soon too.

At the OWL: Experiences and Directions workshop in Athens today, as the community gathered to talk about problems they see with OWL and what they'd like to add to OWL, I felt compelled to point out (using a few slides) that:

And while the OWL errata do include a repeated sentence and a missing word, there have been no substantive problems reported in the normative specifications.

How did we do that? The OWL deliverables include:

OWL test results screenshot

Jeremy and Jos did great work on the tests. And Sandro's approach to getting test results back from the tool developers was particularly inspired. He asked them to publish their test results as RDF data in the web. Then he provided immediate feedback in the form of an aggregate report that included updates live. After our table of test results had columns from one or two tools, several other developers came out of the woodwork and said "here are my results too." Before long we had results from a dozen or so tools and our implementation report was compelling.

The GRDDL tests are coming along nicely; Chime's message on implementation and testing shows that the spec is quite straightforward to implement, and he updated the test harness so that we should be able to support Evaluation and Report Language (EARL) soon.

SPARQL looks a bit more challenging, but I hope we start to get some solid reports from developers about the SPARQL test collection soon too.

tags: QA, GRDDL, SPARQL, OWL, RDF, Semantic Web

11 Nov 2006 by connolly's blog

Google video experiment

This is a test post, to see what happens when I add a link to a video I uploaded to Google video. The video is of Le Thoronet church, in the south of France. Beautiful simple architecture, with haunting audio. Hmm. Could be worse, but it loses a lot of quality compared [...]

10 Nov 2006 by ishida >> blog

A new Planet is born

In the vast cyberspace of the Web galaxy, a new Planet is born: Planet Mobile Web weighs 20 blog feeds (and growing), seems to be pretty active already, and hopefully has a bright future before her. I'm pretty excited this has come to fruition; I think it will be a useful ...

09 Nov 2006 by Don't call me DOM

Tibetan character picker

New picker I finally got around to studying the Tibetan script. To help with that I created a Tibetan picker. This picker includes all the characters in the Unicode Tibetan block. The default shows all characters as images due to the rarity of Tibetan fonts. Consonants are mostly in a typical articulatory arrangement, with vowels below, and [...]

06 Nov 2006 by ishida >> blog

The data displayed here comes from the following sources: Karl Dom Yves Dean Olivier DanC DanC (DIG) TimBL Danny Steven Ivan Ivan Richard

News aggregation available as an RSS feed.

Unfortunately due to the nature of the content we are unable to guarantee this page is valid XHTML. Some portions are Copyright W3C 2005.

Information on POAK including configuration and source code - Dean Jackson.