<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>isambard &#187; Techniques</title>
	<atom:link href="http://isambard.com.au/blog/category/techniques/feed/" rel="self" type="application/rss+xml" />
	<link>http://isambard.com.au/blog</link>
	<description>musings on information design and architecture</description>
	<lastBuildDate>Mon, 30 Jan 2012 04:20:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>UI Rule #92 &#8211; Don&#8217;t sacrifice the useful to fit your design</title>
		<link>http://isambard.com.au/blog/2012/01/30/ui-rule-92-dont-sacrifice-the-useful-information-to-fit-your-design/</link>
		<comments>http://isambard.com.au/blog/2012/01/30/ui-rule-92-dont-sacrifice-the-useful-information-to-fit-your-design/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 04:15:58 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=774</guid>
		<description><![CDATA[Everybody needs a lego moleskine. Comparison shopping at the UK Book Depository proved troublesome because they decided to cut the product title short, removing the information that actually differentiated the products being chosen: Hard to tell which one to choose when everything you want to know about the choices is unavailable. Should I get the [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody needs a lego moleskine.  Comparison shopping at the <a href="http://www.bookdepository.co.uk/search?searchTerm=lego+moleskine&#038;search=search">UK Book Depository</a> proved troublesome because they decided to cut the product title short, removing the information that actually differentiated the products being chosen:</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2012/01/bookDepository.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2012/01/bookDepository.png" alt="" title="bookDepository" width="766" height="659" class="alignleft size-full wp-image-775" /></a></p>
<p>Hard to tell which one to choose when everything you want to know about the choices is unavailable. Should I get the &#8220;Lego Y..&#8221; or, mmmmm, the other &#8220;Lego Y..&#8221;?</p>
<p>Compare to Amazon, who manage to fit the full name in without issue:</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2012/01/amazon.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2012/01/amazon.png" alt="" title="amazon" width="785" height="401" class="alignleft size-full wp-image-776" /></a></p>
<p>If you&#8217;re going to allow a certain number of characters for a value, assume all of those characters may be important at some point.  And make sure somewhere on your interface you let them all get their moment in the sun.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2012%2F01%2F30%2Fui-rule-92-dont-sacrifice-the-useful-information-to-fit-your-design%2F&amp;title=UI%20Rule%20%2392%20%26%238211%3B%20Don%26%238217%3Bt%20sacrifice%20the%20useful%20to%20fit%20your%20design" id="wpa2a_2"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2012/01/30/ui-rule-92-dont-sacrifice-the-useful-information-to-fit-your-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Want your iPad calendar to start the week on Monday?  Move to Namibia</title>
		<link>http://isambard.com.au/blog/2012/01/25/want-your-ipad-calendar-to-start-the-week-on-monday-move-to-namibia/</link>
		<comments>http://isambard.com.au/blog/2012/01/25/want-your-ipad-calendar-to-start-the-week-on-monday-move-to-namibia/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 01:49:58 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=769</guid>
		<description><![CDATA[Frustratingly, my iPad calendar appeared to unilaterally decide that the first day of the week was Sunday. And there was no obvious setting to change it, like there is for Calendar on the Mac. Turns out this &#8220;feature&#8221; is decided by Apple based on your region. They believe Australian weeks start on Sunday so that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Frustratingly, my iPad calendar appeared to unilaterally decide that the first day of the week was Sunday.  And there was no obvious setting to change it, like there is for Calendar on the Mac.</p>
<p>Turns out this &#8220;feature&#8221; is decided by Apple based on your region.  They believe Australian weeks start on Sunday so that&#8217;s the way it is.  To change the day, change your region.</p>
<p>For Australians wanting their calendar to start on a Monday:</p>
<ol>
<li>Launch settings</li>
<li>Select General > International</li>
<li>change region format to Namibia</li>
</ol>
<p>This bizarre choice seems to have the best option for calendar setting, as well as changes it makes to keyboards (what currency symbol you see), date and time formats, even which google you default to when you search.  Namibia appears to leave all the other settings &#8220;just like Australia&#8221;, and still default to google.com.au for searching in Safari.</p>
<p>Thanks to the clever chaps on the <a href="http://forums.whirlpool.net.au/archive/1793827">Whirlpool forums</a>, particularly dokh22, for uncovering this.  Now how long before Apple gives us a calendar setting to do it properly?</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2012%2F01%2F25%2Fwant-your-ipad-calendar-to-start-the-week-on-monday-move-to-namibia%2F&amp;title=Want%20your%20iPad%20calendar%20to%20start%20the%20week%20on%20Monday%3F%20%20Move%20to%20Namibia" id="wpa2a_4"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2012/01/25/want-your-ipad-calendar-to-start-the-week-on-monday-move-to-namibia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple image (frame-by-frame) animation in IOS and Xcode</title>
		<link>http://isambard.com.au/blog/2011/11/05/simple-image-animation-in-ios-and-xcode/</link>
		<comments>http://isambard.com.au/blog/2011/11/05/simple-image-animation-in-ios-and-xcode/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 02:19:32 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=720</guid>
		<description><![CDATA[Adding frame-by-frame animations to your iOS application is simple once you find out that a UIImageView can be initialised with an array of images, not just one image. This post was inspired by a colleague who had not uncovered that fact, and so had spent time arduously linking separate views with timers. This post shows [...]]]></description>
			<content:encoded><![CDATA[<p>Adding frame-by-frame animations to your iOS application is simple once you find out that a UIImageView can be initialised with an array of images, not just one image. </p>
<p>This post was inspired by a colleague who had not uncovered that fact, and so had spent time arduously linking separate views with timers.  This post shows how to use a single view and 3 lines of animation code to do all the work.</p>
<h2>What to do?</h2>
<p>What we&#8217;ll do as a test is animate the blinking eyes on a tennis-playing ninja splash screen.  To trigger the animation will add a &#8220;blink&#8221; button on the same screen.</p>
<p>Don&#8217;t ask how we ended up with that as the example (thanks to the friend).  But you can download the entire project, or just the images if wanting to join in.<br />
<span id="more-720"></span></p>
<ul>
<li><a href='http://isambard.com.au/blog/wp-content/uploads/2011/11/ninjaProject.zip'>download the project</a></li>
<li><a href='http://isambard.com.au/blog/wp-content/uploads/2011/11/ninjaImages.zip'>download the images</a></li>
</ul>
<p>The steps:</p>
<ol>
<li>prepare the images</li>
<li>create the project</li>
<li>create/update a XIB with the image and button</li>
<li>add the animation code and link to the same image and button</li>
</ol>
<blockquote><p>
All the neat animation stuff is described in the 4th step, so feel free to scroll straight to it.  The previous three steps cover all that&#8217;s needed to get your project ready to animate.  I&#8217;ve included it because I hate reading articles  that assume you&#8217;ve covered all the basics already.  Or worse just dismiss it with one line (first step, invent time travel).
</p></blockquote>
<p>Note this process was captured in xCode4/IOS5.  None of the code in here has changed much in recent releases but you may have to adjust some of the steps if running an earlier setup (one thing that has changed in this version is the options when creating a project).</p>
<h2>(1) prepare the images</h2>
<p>Your imagery is limited only by your artistic talents, or abilities to search Google Images or Flickr (remember to honour their copyright, boys and girls).  </p>
<p>Only suggestion is to limit the animation element to the smallest possible; keeps sizes small.  For example, for the blinking ninja, instead of 3 different ninjas with different eye positions (open, half closed, closed), I created one ninja with no eyes, and then three images of just the different eyes.  What we&#8217;ll do in the project is then add the main ninja as one image view, and put the eyes over the top in a separate image.</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/11/ninja-AllImages.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/11/ninja-AllImages.png" alt="" title="ninja-AllImages" width="362" height="339" class="aligncenter size-full wp-image-747" /></a></p>
<p>Whatever approach you take, ensure all the images that will be animated are the same size.  This will ensure when animated they appear over each other.</p>
<h2>create the project</h2>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/10/project-01-create.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/10/project-01-create-300x200.png" alt="" title="project-01-create" width="300" height="200" class="alignright size-medium wp-image-729" /></a><br />
Crack open Xcode and choose <strong>File > New Project</strong>.  I&#8217;m in the latest and greatest (4.2) so your options may vary, but for this version:</p>
<ul>
<li>choose <strong>Single View Application</strong></li>
<li>choose not to use storyboard (so we get a XIB to mess with)</li>
</ul>
<p>Once created we have a simple project containing the key source files:</p>
<ul>
<li>appDelegate.h</li>
<li>appDelegate.m</li>
<li>ViewController.h</li>
<li>ViewController.m</li>
<li>ViewController.xib</li>
</ul>
<blockquote><p>The good news is we&#8217;re only going to be editing the three ViewController files.  Which means you can pretty much follow all of these steps to add an animation to an existing view within your current application;  just join in from the next step.</p></blockquote>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/10/project-02-addFiles.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/10/project-02-addFiles-269x300.png" alt="" title="project-02-addFiles" width="269" height="300" class="alignright size-medium wp-image-736" /></a>Now add your animation images to the project.  Either right-click in the folder view and select <strong>Add Files To..</strong>, or choose <strong>File > Add Files To..</strong> from the menu.</p>
<h2>(2) create/update XIB with the image and button</h2>
<p>Our XIB has already been created in the project.  What to do now is setup the images and buttons we meed, including the outlets needed so we can communicate with them from our code.</p>
<p>Firstly the images.  Remember we need to add two:  1 as the background (which we don&#8217;t need to interact with) and one for the animated eyes (which we will need to talk to).</p>
<p>To hook things up let&#8217;s create the outlets first, and then link in the XIB. Open ViewController.h and add our definition (new text in bold):</p>
<pre>
#import <UIKit/UIKit.h>

@interface ViewController : UIViewController {
    <strong>IBOutlet UIImageView *eyesImage;</strong>
    <strong>IBOutlet UIButton *blinkButton;</strong>
}

<strong>@property (nonatomic, retain) IBOutlet UIImageView *eyesImage;</strong>
<strong>@property (nonatomic, retain) IBOutlet UIButton *blinkButton;</strong>

@end;
</pre>
<p>Then switch over to ViewController.m (tip: 3 fingers down gesture if using a trackpad) and synthesize them:</p>
<pre>
@import "ViewController.h"

@implementation ViewController

<strong>@synthesize eyesImage;</strong>
<strong>@synthesize blinkButton;</strong>
</pre>
<p>Remember if we create them, we should also destroy them:</p>
<pre>
- (void)viewDidUnload
{
    [superviewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
    <strong>self.eyesImage = nil;</strong>
    <strong>self.blinkButton = nil;</strong>
}
</pre>
<p>That gives us our outlets so we can link to, and manipulate these items on our XIB.  Note we don&#8217;t currently need to manipulate the button but the outlet is there just in case (for example if needing to disable the button at some point).</p>
<p>The only other item to add in the code before we edit the XIB is the method to be called when we click the button.</p>
<p>Back into viewController.h and add the definition:</p>
<pre>
#import <UIKit/UIKit.h>

@interface ViewController : UIViewController {
    IBOutlet UIImageView *eyesImage;
    IBOutlet UIButton *blinkButton;
}

@property (nonatomic, retain) IBOutlet UIImageView *eyesImage;
@property (nonatomic, retain) IBOutlet UIButton *blinkButton;

<strong>- (IBAction) blink;</strong>

@end;
</pre>
<p>And then back to ViewController.m, and insert the method somewhere in the list:</p>
<pre><strong>
- (IBAction) blink {
  //blink
}
</strong></pre>
<p>Save the files and we&#8217;re ready to connect them to elements in the XIB.</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/11/imageView.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/11/imageView-300x113.png" alt="" title="imageView" width="300" height="113" class="alignright size-medium wp-image-746" /></a><br />
Firstly open the XIB and drag an imageView onto the work area.<br />
Set the size and content to be our background/static image for the animation.    Don&#8217;t worry with any outlets as we never need to talk to this image.</p>
<p>Now add a 2nd image view to the work area.  Set its position and size to match where the animation is to be presented.  If it helps you with positioning, set the default image to the first of your animation frames.</p>
<p>Once the animated image view is in place, hook up the outlet.  We need to link this to our eyesImage outlet so we can manipulate it.  Just select the Outlets panel for the view, click in the circle for Referencing Outlet and then drag to File&#8217;s Owner on the left side of the work area.  if all has worked you&#8217;ll then get a dropdown list in which you can select eyesImage.  Once selected your outlet will be added.</p>
<p>That&#8217;s all you need to do for the animation.  Now for the button.</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/11/button.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/11/button-300x109.png" alt="" title="button" width="300" height="109" class="alignright size-medium wp-image-763" /></a>Drag a Round Rect Button onto the work area and position somewhere appropriate.  Then add a suitable label (&#8220;blink&#8221; comes to mind).  View the Outlets panel for the button and drag from the Referencing Outlet to File&#8217;s Owner (as we did for the image) and select the blinkButton outlet.  And then, to link to our blink method, drag from the TouchUpInside outlet to the same File&#8217;s Owner.  If all has worked you&#8217;ll then be able to select <code>blink</code> and connect it up.</p>
<p>So that&#8217;s all the XIB sorted.  We&#8217;ve got a background/static image.  We&#8217;ve got a smaller image with an eyesImage outlet for the animation.  And we&#8217;ve got a button that when clicked will trigger our <code>blink()</code> method.  Only one step to go.</p>
<table width="100%">
<tr>
<td valign=top><a href="http://isambard.com.au/blog/wp-content/uploads/2011/11/imageOutlets2.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/11/imageOutlets2-198x300.png" alt="" title="imageOutlets" width="198" height="300" class="alignnone size-medium wp-image-760" /></a></td>
<td valign=top><a href="http://isambard.com.au/blog/wp-content/uploads/2011/11/buttonOutlets.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/11/buttonOutlets-187x300.png" alt="" title="buttonOutlets" width="187" height="300" class="alignnone size-medium wp-image-760" /></a></td>
</tr>
</table>
<p>Save your XIB and then run your project.  You won&#8217;t see anything moving but at least your background image should be in view.</p>
<h2>add the animation code and link to the image and button</h2>
<p>Now for the fun part.</p>
<p>To animate an image we load up the image view with an array of images, set some parameters for how fast and how long the animation runs, and then start it off.  For efficiency we&#8217;ll put all the animation setup into <code>viewDidLoad</code> (so done once when the view first appears), and then just trigger the animation each time we click the button.</p>
<p>So back into viewController.m, let&#8217;s first setup the animation:</p>
<pre>
- (void)viewDidLoad
{
    [superviewDidLoad];
    
        <strong>
       //setup animation
    NSArray *eyeFrames = [NSArrayarray];
    eyeFrames = [[NSArrayalloc] initWithObjects:
                 [UIImageimageNamed:@"eyes1-open.png"],
                 [UIImageimageNamed:@"eyes2-half.png"],
                 [UIImageimageNamed:@"eyes3-closed.png"],
                 nil];
    eyesImage.animationImages = eyeFrames;
    eyesImage.animationDuration = 0.25;
    eyesImage.animationRepeatCount = 1;
    [eyeFrames release];   
    </strong>

}
</pre>
<p>We&#8217;ve added an array of three images to our eyesImage outlet. The animation will take a quarter of a second and will only run once.  Once implemented you&#8217;ll return to these settings (often!) to get the appearance just right.</p>
<p>Once setup, triggering it is just one line of code:</p>
<pre>
- (void) blink {
    <strong>[eyesImage startAnimating];</strong>
}
</pre>
<p>Save and run your project. Then everytime you click the button, magic happens.</p>
<h2>Conclusion</h2>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/11/finished.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/11/finished-159x300.png" alt="" title="finished" width="159" height="300" class="alignright size-medium wp-image-761" /></a> While it took a while to get there, animating our image took only 7 lines of code.  Armed with that code you are limited by only your graphical capabilities.  Just build your images, repeat the 7 lines, and then spend an age tweaking the duration to get it looking right.  </p>
<p>After a while you may find this approach a bit too limited as it scrolls through the image frames at a regular pace.  If wanting a bit more control over the animation  pace, then you&#8217;ll need to step up and start using proper animation blocks.  Next time.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2011%2F11%2F05%2Fsimple-image-animation-in-ios-and-xcode%2F&amp;title=Simple%20image%20%28frame-by-frame%29%20animation%20in%20IOS%20and%20Xcode" id="wpa2a_6"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2011/11/05/simple-image-animation-in-ios-and-xcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IOS5 &#8211; Wireless sync is the gravy</title>
		<link>http://isambard.com.au/blog/2011/10/28/ios5-wireless-sync-is-the-gravy/</link>
		<comments>http://isambard.com.au/blog/2011/10/28/ios5-wireless-sync-is-the-gravy/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 03:10:57 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=733</guid>
		<description><![CDATA[Finally managed to download and install the IOS5 update for the iPad. Most of the new features are unobtrusive, although still trying to find some of them. However what wins is the wireless synchronisation feature. Now I can update my library (songs, books, tv) on my computer and click Sync. And the iPad gets updated [...]]]></description>
			<content:encoded><![CDATA[<p>Finally managed to download and install the IOS5 update for the iPad.  Most of the new features are unobtrusive, although still trying to find some of them.</p>
<p>However what wins is the wireless synchronisation feature.  Now I can update my library (songs, books, tv) on my computer and click Sync.  And the iPad gets updated while not connected.  While not even switched on.  While in my briefcase in another room.  </p>
<p>Sweet.</p>
<p>[Although I'll admit it's probably sweet because Apple kept us tethered for far too long!]</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2011%2F10%2F28%2Fios5-wireless-sync-is-the-gravy%2F&amp;title=IOS5%20%26%238211%3B%20Wireless%20sync%20is%20the%20gravy" id="wpa2a_8"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2011/10/28/ios5-wireless-sync-is-the-gravy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to improve UPK: bonus item</title>
		<link>http://isambard.com.au/blog/2011/06/27/how-to-improve-upk-bonus-item/</link>
		<comments>http://isambard.com.au/blog/2011/06/27/how-to-improve-upk-bonus-item/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 06:14:27 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[UPK]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=698</guid>
		<description><![CDATA[I&#8217;m in the midst of collating a series of issues/quirks with UPK 3.6.1, hoping that Oracle are listening. While organising here&#8217;s a bonus item. When I&#8217;m editing frame properties, don&#8217;t present a tooltip that has the unerring habit of appearing directly over the top of where I&#8217;m trying to type!! B!@#y annoying.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the midst of collating a series of issues/quirks with UPK 3.6.1, hoping that Oracle are listening.  While organising here&#8217;s a bonus item.</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/06/UPK-Fix-26-kill-tooltip.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/06/UPK-Fix-26-kill-tooltip.png" alt="" title="UPK-Fix-26-kill-tooltip" width="248" height="155" class="aligncenter size-full wp-image-700" /></a></p>
<p>When I&#8217;m editing frame properties, don&#8217;t present a tooltip that has the unerring habit of appearing directly over the top of where I&#8217;m trying to type!!  B!@#y annoying.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2011%2F06%2F27%2Fhow-to-improve-upk-bonus-item%2F&amp;title=How%20to%20improve%20UPK%3A%20bonus%20item" id="wpa2a_10"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2011/06/27/how-to-improve-upk-bonus-item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharing a Calendar in Sharepoint 2007 &#8211; Part II</title>
		<link>http://isambard.com.au/blog/2011/05/19/sharing-a-calendar-in-sharepoint-2007-part-ii/</link>
		<comments>http://isambard.com.au/blog/2011/05/19/sharing-a-calendar-in-sharepoint-2007-part-ii/#comments</comments>
		<pubDate>Thu, 19 May 2011 04:45:25 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[interface design]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=653</guid>
		<description><![CDATA[Earlier I wrote about how you can use XML+XSL to get around the limitation in Sharepoint 2007 of sharing calendars across multiple sites. This technique stores your events as XML and allows you to publish entries wherever and however you wish. This article expands that earlier introduction with some tips and tricks we collating when [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://isambard.com.au/blog/2011/01/10/sharing-a-calendar-in-sharepoint-2007/">Earlier</a> I wrote about how you can use XML+XSL to get around the limitation in Sharepoint 2007 of sharing calendars across multiple sites.  This technique stores your events as XML and allows you to publish entries wherever and however you wish.</p>
<p>This article expands that earlier introduction with some tips and tricks we collating when implementing this for one client:</p>
<ul>
<li>working outside Sharepoint</li>
<li>presenting a URL</li>
<li>sorting items</li>
<li>grouping items</li>
<li>showing a message if a filter set is empty</li>
</ul>
<p>Note:  You can <a href="http://isambard.com.au/blog/wp-content/uploads/2011/05/calendar-v2.zip">download sample XML and XSL</a> here.  These files show all the techniques described in this article.</p>
<table>
<tbody>
<tr>
<td><a href="http://isambard.com.au/blog/wp-content/uploads/2011/05/image-xml.png"><img class="alignnone size-thumbnail wp-image-660" title="image-xml" src="http://isambard.com.au/blog/wp-content/uploads/2011/05/image-xml-150x150.png" alt="" width="150" height="150" /></a></td>
<td><a href="http://isambard.com.au/blog/wp-content/uploads/2011/05/image-filter.png"><img class="alignnone size-thumbnail wp-image-661" title="image-filter" src="http://isambard.com.au/blog/wp-content/uploads/2011/05/image-filter-150x150.png" alt="" width="150" height="150" /></a></td>
<td><a href="http://isambard.com.au/blog/wp-content/uploads/2011/05/image-group.png"><img class="alignnone size-thumbnail wp-image-662" title="image-group" src="http://isambard.com.au/blog/wp-content/uploads/2011/05/image-group-150x150.png" alt="" width="150" height="150" /></a></td>
</tr>
<tr>
<td>the original XML</td>
<td>filtered view</td>
<td>grouped view</td>
</tr>
</tbody>
</table>
<p><span id="more-653"></span></p>
<h2>Working outside SharePoint</h2>
<p>It can be painful to develop your XML/XSL solution in Sharepoint because of the need to upload new versions (or edit webparts), then refresh to see the results, or lack thereof.  Easier to work outside and just upload when done.</p>
<p>To link your XML and XSL outside SharePoint edit your XML file to include a link to your XSL file:</p>
<pre>&lt;!--?xml version="1.0" encoding="utf-8"?--&gt;
<strong>&lt;!--?xml-stylesheet type="text/xsl" href="calendar.xsl"?--&gt;</strong>
....</pre>
<p>Now when you open your XML file in a browser it will use your XSL to present.</p>
<p>Save your XLS as a file with a name to match the XML link and you&#8217;re nearly there.  The only other change you may need to make is to extend your XSL so it generates a full webpage, not just a fragment.</p>
<p>For example our standard calendar presentation XSL generates a paragraph:</p>
<pre>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
&lt;xsl:template match="calendar"&gt;
&lt;p&gt;
&lt;xsl:for-each select="event[program='Leadership Foundations']"&gt;
...
&lt;/xsl:for-each&gt;
&lt;/p&gt;
&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;</pre>
<p>To work outside SharePoint it needs to generate a proper page; make it do so by simply adding HTML and BODY tags:</p>
<pre>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
&lt;xsl:template match="calendar"&gt;
<strong>&lt;html&gt;</strong>
<strong>&lt;body&gt;</strong>
&lt;p&gt;
&lt;xsl:for-each select="event[program='Leadership Foundations']"&gt;
...
&lt;/xsl:for-each&gt;
&lt;/p&gt;
<strong>&lt;body&gt;</strong>
<strong>&lt;html&gt;</strong>
&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;</pre>
<p>Just remember to remove these bonus lines when re-inserting into your SharePoint site.</p>
<h2>Presenting a URL</h2>
<p>If one element you&#8217;re recorded in your XML is a URL then chances are you&#8217;ll want to use XSL to convert that into a link.  And the obvious approach you&#8217;d think would be the simplest:</p>
<pre>&lt;a href='&lt;xsl:value-of select="link"&gt;'&gt;link text&lt;/a&gt;</pre>
<p>Other than the issue over nested quotes, all looks pretty straightforward.  Except it doesn&#8217;t work.</p>
<p>The solution is to use a different format for the URL selection:</p>
<pre>&lt;a href="{link}"&gt;link text&lt;/a&gt;</pre>
<p>Now it works fine.</p>
<h2>Sorting items</h2>
<p>One feature we wanted to implement was the automatic sorting of results.  This meant anyone maintaining the master XML list did not need to worry about where to add individual items to preserve their order.  They could just add anywhere in the file and be confident they&#8217;d appear in the correct sequence when displayed.</p>
<p>To sort results, add the <code>&lt;xsl:sort&gt;</code> command as the first element within your  loop. For example to sort by a date element:</p>
<pre>&lt;xsl:for-each select="event"&gt;
    &lt;xsl:sort select="date" /&gt;
    ...
&lt;/xsl:for-each&gt;</pre>
<p>Check <a href="www.w3schools.com/xsl/el_sort.asp">W3Schools</a> if wanting to do something more complicated than an ascending text order.</p>
<p>As you can see from this example, what we were wanting to search on were dates.  And early on we&#8217;d decided that users would enter dates in &#8220;human&#8221; format (ie &#8217;23 May 2011&#8243;, not 20110523).   One issue we had on sorting dates was the chestnut of how to sort &#8220;2 May 2011&#8243; to appear before &#8220;15 May 2011&#8243;.  Our solution was to require all dates in the XML to be two characters (&#8220;02 May 2011&#8243; not &#8220;2 May 2011&#8243;) and then use XSL to remove the ugly leading zero when displayed.  The code to remove that zero is straightforward:</p>
<pre>&lt;xsl:choose&gt;
    &lt;xsl:when test="substring(date,1,1)=0"&gt;
         &lt;xsl:value-of select="substring(date,2)" /&gt;
    &lt;xsl:otherwise&gt;
&lt;/xsl:choose&gt;</pre>
<p>You have to use the <code>&lt;xsl:choose&gt;</code> construct because while XSL does have an IF statement (not surprisingly <code>&lt;xsl:if&gt;</code>), it does not have an equivalent ELSE.</p>
<p>Note:  The alternative would be to define the date in a nice sortable format (I vote for YYYYMMDD).  And then use similar XSL transformations to present in a more readable format.  Either way you&#8217;re putting some overhead on the user.  We stuck with this simple approach because it was (a) less user effort and (b) allowed a wider range of dates to be acceptable.  For example we had some programs that only specified a month.  Sorting this way meant we could accept &#8220;May 2011&#8243; as a valid date.</p>
<h2>Grouping items</h2>
<p>Now this I thought would be easy. Since we&#8217;re working on a calendar, let&#8217;s group entries according to the month.  ie:</p>
<p>April 2011<br />
- This course (12 April, London)<br />
- That course (19 April, Helsinki)<br />
May 2011<br />
- That course (2 May, Romford)<br />
- The other course (30 May, Malaka)</p>
<p>After several false starts, all roads do eventually lead to a fabled Meunchian method.  Trouble is, even after building it, I&#8217;ve no idea how it works.  Of all the articles uncovered to try and explain it, <a href="docstore.mik.ua/orelly/xml/xslt/ch06_02.htm">this one came closest</a>.  Cut&amp;paste their approach (or <a href="http://isambard.com.au/blog/wp-content/uploads/2011/05/calendar-v2.zip">our example</a> using it) and you should be able to get it to work.</p>
<h2>Showing a message if the filter set is empty</h2>
<p>In the <a href="http://isambard.com.au/blog/2011/01/10/sharing-a-calendar-in-sharepoint-2007/">first article</a> we covered how simple it is to present a subset of your entries. However once implemented we discovered we needed to address the situation where a subset was empty.  Rather than just showing a blank list we wanted to show a messsage directing the visitor to other sources.</p>
<p>Simplest way to implement this is to repeat the same filter query used to generate the subset. Just place within a COUNT() and use as a test:</p>
<pre>&lt;xsl:choose&gt;
     &lt;xsl:when test="count(event[program='First Program']) &gt; 0"&gt;

          &lt;xsl:for-each select="event[program='First Program']"&gt;
          ...
          &lt;/xsl:for-each&gt;

     &lt;/xsl:when&gt;
     &lt;xsl:otherwise&gt;
          &lt;xsl:text&gt;No events recorded for this program.&lt;/xsl:text&gt;
     &lt;/xsl:otherwise&gt;
&lt;/xsl:choose&gt;</pre>
<p>Only potential issue may be around your formatting.  Be mindful of where your layout tags appear depending on which data is presented.</p>
<h2>Conclusion</h2>
<p>With just these techniques you can present and manipulate your content in quite ingenious ways.  Just good luck trying to understand the Muench.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2011%2F05%2F19%2Fsharing-a-calendar-in-sharepoint-2007-part-ii%2F&amp;title=Sharing%20a%20Calendar%20in%20Sharepoint%202007%20%26%238211%3B%20Part%20II" id="wpa2a_12"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2011/05/19/sharing-a-calendar-in-sharepoint-2007-part-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UI Rule #47 &#8211; Don&#8217;t Make Up Words</title>
		<link>http://isambard.com.au/blog/2011/01/21/ui-rule-47-dont-make-up-words/</link>
		<comments>http://isambard.com.au/blog/2011/01/21/ui-rule-47-dont-make-up-words/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 03:04:17 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[interface design]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=644</guid>
		<description><![CDATA[Found the following beauty when on Youtube: You shouldn&#8217;t have to invent your own language (&#8220;Favorited?&#8221;) to make your UI work.]]></description>
			<content:encoded><![CDATA[<p>Found the following beauty when on Youtube:</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/01/favorited.png"><img class="alignright size-full wp-image-645" title="favorited" src="http://isambard.com.au/blog/wp-content/uploads/2011/01/favorited.png" alt="" width="268" height="149" /></a></p>
<p>You shouldn&#8217;t have to invent your own language (&#8220;Favorited?&#8221;) to make your UI work.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2011%2F01%2F21%2Fui-rule-47-dont-make-up-words%2F&amp;title=UI%20Rule%20%2347%20%26%238211%3B%20Don%26%238217%3Bt%20Make%20Up%20Words" id="wpa2a_14"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2011/01/21/ui-rule-47-dont-make-up-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ePUB doesn&#8217;t like named anchors, use IDs</title>
		<link>http://isambard.com.au/blog/2011/01/11/epub-doesnt-like-named-anchors-only-ids/</link>
		<comments>http://isambard.com.au/blog/2011/01/11/epub-doesnt-like-named-anchors-only-ids/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 02:31:45 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[ePub]]></category>
		<category><![CDATA[iBooks]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=592</guid>
		<description><![CDATA[In a recent ePUB I got lazy. Rather than having separate XHTML files for each section I kept them in larger files and used HTML anchor and name tags to match them up. Problem is this doesn&#8217;t work. What I had was one file per chapter, divided into sections. So my content.xhtml looked like this: [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent ePUB I got lazy.  Rather than having separate XHTML files for each section I kept them in larger files and used HTML anchor and name tags to match them up.  Problem is this doesn&#8217;t work.</p>
<p>What I had was one file per chapter, divided into sections.  So my content.xhtml looked like this:</p>
<pre>
&lt;h1>Chapter Title&lt;/h1>
&lt;h2>&lt;a name="part1">&lt;/a>First Part&lt;/h2>
...
&lt;h2>&lt;a name="part2">&lt;/a>Second Part&lt;/h2>
...
&lt;h2>&lt;a name="part3">&lt;/a>Third Part&lt;/h2>
...
</pre>
<p>This was then accessed from toc.ncx as follows.  Important link bits in bold:</p>
<pre>
...
&lt;navPoint playOrder=11>&lt;navLabel>&lt;text>Chapter Title&lt;/text>&lt;/navLabel>
  &lt;content src="chapter.xhtml" />&lt;/navPoint>
&lt;navPoint playOrder=12>&lt;navLabel>&lt;text>Part 1&lt;/text>&lt;/navLabel>
  &lt;content src="<b>chapter.xhtml#part1</b>" />&lt;/navPoint>
&lt;navPoint playOrder=13>&lt;navLabel>&lt;text>Part 2&lt;/text>&lt;/navLabel>
  &lt;content src="<b>chapter.xhtml#part2</b>" />&lt;/navPoint>
&lt;navPoint playOrder=14>&lt;text>Part &lt;/text>&lt;/navLabel>
  &lt;content src="<b>chapter.xhtml#part3</b>" />&lt;/navPoint>
...
</pre>
<p>None of these TOC links work when published as an ePUB (testing in Adobe Digital Editions).  </p>
<p>Bit of digging (<a href="http://www.mobileread.com/forums/showthread.php?t=113310">this helped</a>) and testing, and issue is with the &#8220;name&#8221; piece.  These are not recognised.  Instead you need to use IDs.</p>
<p>The good news is you don&#8217;t have to change the toc.ncx references, or any other references to the sections.  Only the targets need to change.  Edit your content from:</p>
<pre>
&lt;h2>&lt;a name="part1">First Part&lt;/h2>
</pre>
<p>To any of the following:</p>
<pre>
&lt;h2>&lt;a id="part1">&lt;/a>First Part&lt;/h2>
&lt;h2>&lt;a id="part1" name="part1">&lt;/a>First Part&lt;/h2>
&lt;h2 id="part1">First Part&lt;/h2>
</pre>
<p>Obviously the third option (add the ID to the heading itself) is the cleanest.  However the first option is the one easiest to implement via global search and replace.  Which means it was the one I chose.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2011%2F01%2F11%2Fepub-doesnt-like-named-anchors-only-ids%2F&amp;title=ePUB%20doesn%26%238217%3Bt%20like%20named%20anchors%2C%20use%20IDs" id="wpa2a_16"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2011/01/11/epub-doesnt-like-named-anchors-only-ids/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sharing a calendar in Sharepoint 2007</title>
		<link>http://isambard.com.au/blog/2011/01/10/sharing-a-calendar-in-sharepoint-2007/</link>
		<comments>http://isambard.com.au/blog/2011/01/10/sharing-a-calendar-in-sharepoint-2007/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 05:40:47 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[interface design]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=577</guid>
		<description><![CDATA[One of the most annoying omissions in Sharepoint 2007 is the inability to share calendars between sites and subsites: maintain a master calendar and view it (or part of it) in a subsite, or maintain a calendar in the subsite and &#8220;roll it up&#8221; with other subsite calendars to a master view in the main [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most annoying omissions in Sharepoint 2007 is the inability to share calendars between sites and subsites:</p>
<ul>
<li>maintain a master calendar and view it (or part of it) in a subsite, or</li>
<li>maintain a calendar in the subsite and &#8220;roll it up&#8221; with other subsite calendars to a master view in the main site.</li>
</ul>
<p>Apparently this is rectified in Sharepoint 2010 but if you&#8217;re unable to upgrade, and aren&#8217;t allowed to build your own webparts, you&#8217;ve to look elsewhere for a solution:</p>
<ul>
<li>use a 3rd party webpart (can recommend the <a href="http://store.bamboosolutions.com/sharepoint-calendar-plus-web-part.aspx">Bamboo Solutions</a> offering having used it elsewhere), or</li>
<li>hacking together via the page viewer webpart (I never got this to work but your mileage may vary)</li>
</ul>
<p>However this article describes a 3rd option we implemented which met the requirement by not using calendars at all.  Instead we used XML.<br />
<span id="more-577"></span></p>
<h2>An XML solution in three parts</h2>
<p>The XML solution allows a single, master, calendar to be published in multiple subsites, optionally filtering entries to particular subsets.  To implement you need three elements:</p>
<ol>
<li>source calendar (in XML, not a SharePoint calendar)</li>
<li>presentation/design code (XSL), and</li>
<li>webpart that links the above two together on your site.</li>
</ol>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/01/SharePoint-CalendarList.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/01/SharePoint-CalendarList-300x249.png" alt="" title="SharePoint-CalendarList" width="300" height="249" class="alignright size-medium wp-image-605" /></a>Without advanced CSS skills this won&#8217;t get you much more than an event list on any site.  But if that&#8217;s all you want, and more important is the ability to reproduce that one list on multiple sites, then this approach might work for you.</p>
<h2>Source calendar (XML)</h2>
<p>In XML a calendar is simply a series of events, with varying parameters that include a date and a name, collected in a parent element.  For our basic implementation we ended up with just that:</p>
<pre>&lt;calendar&gt;
 &lt;event&gt;
  &lt;date&gt;12 August 2011&lt;/date&gt;
  &lt;title&gt;Integration testing starts&lt;/title&gt;
 &lt;/event&gt;
 &lt;event&gt;
  &lt;date&gt;23 November 2011&lt;/date&gt;
  &lt;title&gt;Integration testing ends&lt;/title&gt;
 &lt;/event&gt;
 ...
&lt;/calendar&gt;</pre>
<p>To make it valid just add a definition on the first line:</p>
<pre>&lt;?xml version="1.0" standalone="no"?&gt;</pre>
<p>From this basis you can obviously add whatever other values you want to note for each event.  For example if you want to present or filter by project, or responsibility, just add appropriate values to the XML.</p>
<h2>presentation/design code (XSL)</h2>
<p>The XSL code is what converts your XML into HTML that can be presented on your Sharepoint page.  With the simple calendar schema adopted here this is only a few lines.</p>
<p>First set the scene:</p>
<pre> &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
 &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;

 ...

 &lt;/xsl:stylesheet&gt;</pre>
<p>Then add the XSL proper inside the above framework.  The following code will first match our calendar parent element using <code>template-match</code>, before traversing each of our events by using a <code>for-each</code> loop.</p>
<pre> &lt;xsl:template match="CALENDAR"&gt;
  &lt;table border="0"&gt;
    &lt;xsl:for-each select="EVENT"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;xsl:value-of select="title" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;xsl:value-of select="date" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/xsl:for-each&gt;
  &lt;/table&gt;
&lt;/xsl:template&gt;</pre>
<p>This code puts each event (the &#8220;EVENT&#8221; elements) into a separate row in a table, with two event values &#8220;title&#8221; and &#8220;date&#8221; presented in separate columns.</p>
<p>This code gives you the basic framework for manipulating your XML.  However XSL, and HTML/CSS are must more powerful than this example demonstrates.  Feel free to research further on how to leverage this approach to really fine-tune the delivery of your calendar data.</p>
<p>For now, however, I will describe one of the most common XSL functions you&#8217;ll want in this solution: the ability to present a subset of your calendar entries based on a parameter recorded with each event.</p>
<h3>Filtering records</h3>
<p>In XSL you filter records by adding a comparison operator to your <code>for-each</code> statement. For example, if we add a &#8220;project&#8221; attribute to our events, the code to filter to a specific project is a simple change to the <code>for-each</code> command:</p>
<pre> &lt;xsl:for-each select="EVENT[project='Project A']"&gt;</pre>
<p>This will now only list events that are for &#8220;Project A&#8221;.  And how do you get entries to be categorised as &#8220;Project A&#8221; &#8211; just add to the XML:</p>
<pre>&lt;calendar&gt;
 &lt;event&gt;
  &lt;project&gt;Project A&lt;/date&gt;
  &lt;date&gt;12 August 2011&lt;/date&gt;
  &lt;title&gt;Integration testing starts&lt;/title&gt;
 &lt;/event&gt;
 &lt;event&gt;
  &lt;project&gt;Project B&lt;/date&gt;
  &lt;date&gt;23 November 2011&lt;/date&gt;
  &lt;title&gt;Integration testing ends&lt;/title&gt;
 &lt;/event&gt;
 ...
&lt;/calendar&gt;</pre>
<h2>Linking webpart</h2>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/01/SharePoint-EditXMLWebPart.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/01/SharePoint-EditXMLWebPart-209x300.png" alt="" title="SharePoint-EditXMLWebPart" width="209" height="300" class="alignright size-medium wp-image-607" /></a>To pull the XML and XSL together on your Sharepoint page, add an XML Webpart.</p>
<p>In this webpart you simply specify the XML and XSL you need to use.  You can enter your details directly into the webpart (which negates the whole sharing theme for the XML, and can cause consistency issues with the XSL).  Or you can link to external files.  With the advantage that those files can exist anywhere in your site architecture.
</pre>
<h2>Conclusion</h2>
<p>Using XML to share a single calendar is not for everybody.  It's harder to maintain the entries, and the presentation is never going to be sexy.  But as a quick way to stop yourself repeating yourself, it's worth considering.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2011%2F01%2F10%2Fsharing-a-calendar-in-sharepoint-2007%2F&amp;title=Sharing%20a%20calendar%20in%20Sharepoint%202007" id="wpa2a_18"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2011/01/10/sharing-a-calendar-in-sharepoint-2007/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ePUB won&#8217;t validate because OPF file missing?  Check container.xml</title>
		<link>http://isambard.com.au/blog/2010/12/29/epub-wont-validate-because-opf-file-missing-check-container-xml/</link>
		<comments>http://isambard.com.au/blog/2010/12/29/epub-wont-validate-because-opf-file-missing-check-container-xml/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 23:32:50 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[ePub]]></category>

		<guid isPermaLink="false">http://isambard.com.au/blog/?p=585</guid>
		<description><![CDATA[Just had a frustrating issue in building a new ePUB where the validation (thanks Threepress) failed saying the OPF file was missing. Even though it was there clear as day in the source files. If you do have an .OPF file but get this error, then the issue is not with this file at all, [...]]]></description>
			<content:encoded><![CDATA[<p>Just had a frustrating issue in building a new ePUB where the validation (thanks <a href="http://threepress.org/document/epub-validate/">Threepress</a>) failed saying the OPF file was missing.  Even though it was there clear as day in the source files.</p>
<p><a href="http://isambard.com.au/blog/wp-content/uploads/2011/01/epub-opf.png"><img src="http://isambard.com.au/blog/wp-content/uploads/2011/01/epub-opf-234x300.png" alt="" title="OPF and container.xml" width="234" height="300" class="alignright size-medium wp-image-586" /></a>If you do have an .OPF file but get this error, then the issue is not with this file at all, but with container.xml (which lives in the META-INF folder).  This file does little more than point to your .OPF file.  The error therefore arises if it points in the wrong direction.</p>
<p>In my instance the issue was caused by using an ePUB template/shell with a different default value for the filename and path to the .OPF.  Note if I&#8217;d been paying attention the error message gives you all the information needed to resolve the issue since it reports a different filename for the .OPF to the one created.  If they don&#8217;t match then container.xml is the culprit.</p>
<p>Here&#8217;s the all important line in container.xml.  Make sure the name and match match your own construction.</p>
<pre>
&lt;rootfile full-path="<strong>OEBPS/content.opf</strong>" media-type="application/oebps-package+xml"/>
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fisambard.com.au%2Fblog%2F2010%2F12%2F29%2Fepub-wont-validate-because-opf-file-missing-check-container-xml%2F&amp;title=ePUB%20won%26%238217%3Bt%20validate%20because%20OPF%20file%20missing%3F%20%20Check%20container.xml" id="wpa2a_20"><img src="http://isambard.com.au/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://isambard.com.au/blog/2010/12/29/epub-wont-validate-because-opf-file-missing-check-container-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

