<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="pto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#">
<info>
    
    
    
    
    
    
    
    
    
    
    
    
    
<title>Itinerary How To</title><biblioid class="uri">http://norman.walsh.name/2004/08/25/itineraryHowTo</biblioid>
<volumenum>7</volumenum>
<issuenum>150</issuenum>
<pubdate>2004-08-25T07:55:50-04:00</pubdate>
<date>$Date: 2005-09-11 10:27:02 -0400 (Sun, 11 Sep 2005) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2004</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>Some time ago, I started generating itinerary pages for my
travels. I’m sure I was inspired in part by Dan’s TravelTools and
PathCross Wiki pages, so when Dan offered bonus points for describing
how the pages are constructed, how could I resist?</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#SelfReference"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Travel"/>
</info>

<epigraph>
<attribution>
      <personname>
<firstname>Samuel</firstname>
<surname>Johnson</surname>
</personname>
    </attribution>
<para xml:id="p1">The use of traveling is to regulate imagination by reality, and,
instead of thinking how things may be, to see them as they are.
</para>
</epigraph>

<para xml:id="p2">Some time ago, I started generating
<link xlink:href="/2004/itinerary/">itinerary pages</link> for my travels.
I’m sure I was inspired in part by
<personname>
      <firstname>Dan</firstname>
      <surname>Connolly</surname>
    </personname>’s
<link xlink:href="http://esw.w3.org/topic/TravelTools">TravelTools</link>
and <link xlink:href="http://esw.w3.org/topic/PathCross">PathCross</link> Wiki pages,
so when Dan
<link xlink:href="http://www.ilrt.bris.ac.uk/discovery/chatlogs/rdfig/2004-08-24#T18-09-43">offered bonus points</link>
for describing how the pages are constructed, how could I resist?</para>

<para xml:id="p3">All of the important data is in my “personal information appliance.”
In other words, I get it all
<link xlink:href="http://nwalsh.com/docs/presentations/extreme2002/">out of my Palm</link>.
What usually happens is this:</para>

<orderedlist>
<listitem>
<para xml:id="p4">Some event crosses my radar (conference, working group meeting,
vacation, invitation to speak, whatever). As soon as I know about an
event, I create an appointment in my Palm.</para>

<para xml:id="p5">Let’s take the October, 2004 TAG face-to-face meeting as a
concrete example. Here’s the appointment for that meeting (I’m displaying
the synced XML, simplified a little, for convenience):</para>

<programlisting>&lt;appointment&gt;
  &lt;description&gt;TAG f2f&lt;/description&gt;
  &lt;begin date="2004-10-05"/&gt;
  &lt;repeat frequency="1" type="Daily" end="2004-10-07"/&gt;
  &lt;datebk4 category="7" timezone="GMT-5:00"/&gt;
  &lt;note&gt;rdf:
it:tripid trip-2004-10-tag
p:access public
p:class undecided
&lt;/note&gt;
&lt;/appointment&gt;</programlisting>

<para xml:id="p6">I use RDF in the note field to extend the Palm database; it all gets
turned into RDF anyway.</para>

<variablelist>
<varlistentry>
	  <term>
	    <property>it:tripid</property>
	  </term>
<listitem>
<para xml:id="p7">Is a key that allows me to extract all the appointments related to a
particular trip.</para>
</listitem>
</varlistentry>
<varlistentry>
	  <term>
	    <property>p:access</property>
	  </term>
<listitem>
<para xml:id="p8">Controls which appointments are copied to
<link xlink:href="http://norman.walsh.name/">http://norman.walsh.name/</link>.
Most things get copied (or not) based on their category, but for “Business”
appointments, the default is “not” and I use <property>p:access</property> to
override that default.</para>
</listitem>
</varlistentry>
<varlistentry>
	  <term>
	    <property>p:class</property>
	  </term>
<listitem>
<para xml:id="p9">Is a badly named property that has essentially three states: yes,
I’ve committed to go, I’m undecided, or no, I’m definitely not going.
Appointments that have an undecided or not going class don’t conflict
with other appointments, so I don’t get warnings about double-bookings.
(In practical terms, the HTML view of my whole schedule doesn’t draw
them in bright red.)</para>
</listitem>
</varlistentry>
</variablelist>

<para xml:id="p10">I also add a note to the itinerary overview page for the year in
question if I think it’s likely I’ll go to the event:</para>

<programlisting>&lt;listitem&gt;
&lt;para xml:id='p11'&gt;05-07 Oct, TAG, Basel, CH. (Planned.)
&lt;/para&gt;
&lt;?calendar month="2004-10" highlight-start="05" highlight-end="07"?&gt;
&lt;/listitem&gt;</programlisting>

<para xml:id="p12">The calendar processing instruction generates the colorized calendar.
In theory, the information needed to build that calendar is in the data, but
as we’ll see, it’s not always completely straightforward.</para>
</listitem>
<listitem>
<para xml:id="p13">At some point, I actually decide that I’m going to participate in the
event. Most of my travel is work-related so the next step is to get
an expense request together. To do that, I call the corporate travel agent
and figure out an itinerary so I can price the airline ticket.
</para>
<para xml:id="p14">In this case, the itinerary takes me through London and staying
over the Saturday night makes the ticket vastly cheaper, so I decide
to tack a few days onto the front of my trip and visit my folks. That’s
what makes getting the right colorized calendar tricky; it doesn’t correspond
to any particular appointment.</para>

<para xml:id="p15">Eventually, I get an email message with a bunch of transportation, rental car,
and hotel information in it. That’s not very useful, so
<link xlink:href="http://www.w3.org/2000/10/swap/pim/travel.html">following
<personname>
	    <firstname>Dan</firstname>
<surname role="suppress">Connolly</surname>
	  </personname>’s
lead</link> again, I scrape it into RDF-augmented Palm appointments.
Now I have a bunch of new entries like this one:</para>

<programlisting>&lt;appointment&gt;
  &lt;description&gt;BOS-LHR/AA 108&lt;/description&gt;
  &lt;begin date="2004-09-29" time="19:10:00"/&gt;
  &lt;end date="2004-09-29" time="06:35:00"/&gt;
  &lt;repeat frequency="1" type="Daily" end="2004-09-30"/&gt;
  &lt;datebk4 category="12" icon="14" spans_midnight="1" timezone="all"/&gt;
  &lt;note&gt;rdf:
it:tripid trip-2004-10-tag
it:depart xab:BOS
it:arrive xab:LHR
it:flight "108"
it:airline "American Airlines"
it:class "S"
it:seat "23C"
it:meal "dinner/cont. breakfast"
it:equip "777"
it:duration "6:25"
it:miles "3265"
p:uri http://www.seatguru.com/american/B772A.shtml
p:who xab:american-airlines
p:access public

MOVIE/TELEPHONE/AUDIO PROGRAMMING/
DUTY FREE SALES/NON-SMOKING/
IN-SEAT POWER SOURCE
DEPARTS BOS TERMINAL B  - ARRIVES LHR TERMINAL 3
&lt;/note&gt;
&lt;/appointment&gt;</programlisting>

<para xml:id="p16">The “<code>xab:</code>” prefix identifies entries in my address book, which
associates the flight with arrival and departure airports, airlines, etc.</para>

<para xml:id="p17">I also update the event appointment at this point, so that it’s no longer
“undecided.” I also add a <property>p:hotel</property> property to identify
the hotel I plan to stay at, if I’ve figured that out.</para>
</listitem>
<listitem>
<para xml:id="p18">If I’m going to new airports, or staying at new hotels, I make address book
entries for them. I could get some information about the airports from other
public data sources, but I prefer to have my own address book entries for them.</para>
</listitem>
<listitem>
<para xml:id="p19"><link xlink:href="http://www.tbray.org/ongoing/When/200x/2003/12/13/MegaXML">Shake
well and stir until smooth</link>.
</para>
<para xml:id="p20">I run <application>cwm</application> to build an RDF file containing everything
in my Palm, then I run a few stylesheets that use
<link xlink:href="http://nwalsh.com/docs/presentations/extreme2003/">RDF Twig</link>
to extract the “public” information and build
<link xlink:href="/knows/what.rdf">what.rdf</link>, 
<link xlink:href="/knows/when.rdf">when.rdf</link>, 
<link xlink:href="/knows/where.rdf">where.rdf</link>, and
<link xlink:href="/knows/who.rdf">who.rdf</link>.
These are all <application>cwm</application>’d together along with all
the other site metadata to produce
<link xlink:href="/knows/norman.walsh.name.rdf">norman.walsh.name.rdf</link> (that’s
more than 3Mb so think before you click).</para>
<para xml:id="p21">The stylesheets that actually build
HTML and PDF pages on this site use that RDF data.</para>
</listitem>
<listitem>
<para xml:id="p22">Make the flight maps and copy them to the right places.
All the departure and arrival information is already in my Palm and the airports
have geographic metadata, so all I do is run
<command>make TRIPID=trip-2004-10-tag tripmap</command>. Sweet.</para>
</listitem>
<listitem>
<para xml:id="p23">Write the <link xlink:href="/2004/itinerary/09-28-tag">itinerary page</link>. I use a
processing instruction, <code>&lt;?itinerary tripid="trip-2004-10-tag"?&gt;.</code>
to produce the itinerary and table of appointments automatically from the Palm
data.</para>
</listitem>
<listitem>
<para xml:id="p24">Update the overview page:</para>

<programlisting>&lt;listitem&gt;
&lt;para xml:id='p25'&gt;&lt;link xlink:href="09-28-tag"&gt;28 Sep-08 Oct&lt;/link&gt;,
Vacation, Norwich, UK; TAG, Basel, CH.
(Booked.)
&lt;/para&gt;
&lt;?calendar month="2004-09" highlight-start="29" highlight-end="30"?&gt;
&lt;?calendar month="2004-10" highlight-start="01" highlight-end="08"?&gt;
&lt;/listitem&gt;</programlisting>
</listitem>

<listitem>
<para xml:id="p26">Rebuild the site: type <command>make</command>.
</para>
</listitem>
</orderedlist>

<para xml:id="p27">Ideally, there’d be enough information in the RDF data on the site
for an agent to
determine where I’m going to be and when, the first step in determining if
our paths will cross. In practice, I don’t think I’m quite there yet. First,
I’m not producing
<link xlink:href="http://esw.w3.org/topic/RdfCalendar">standard</link> RDF calendar
data (periodically, I try to and eventually give up somewhere the RDF/iCal swamp)
and second, there’s no explicit assertion that I’m attending any particular
event. I think you could infer that, but it’d be better if I made it explicit
in some standard way. If I knew of any standard way.</para>

<para xml:id="p28">So, how many bonus points do I get? And is it more than the demerits I get
for doing some of it by hand?</para>

<para xml:id="p29">Update: 21 Mar 2005. The transition from a Palm to
<link xlink:href="/2005/01/11/sidekick">my Sidekick</link> forced me
to change some of the mechanics. In spirit, I'm still doing the same
thing, but now I generate an intermediate XML representation which I
paste into the itinerary page.</para>

</essay>

