<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>David Landwehr&apos;s blog</title>
      <link>http://landwehr.dk/blog/</link>
      <description></description>
      <language>en</language>
      <copyright>Copyright 2010</copyright>
      <lastBuildDate>Mon, 07 Jun 2010 22:07:49 +0100</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

            <item>
         <title>Spiral Paint</title>
         <description><![CDATA[I created a small spiral paint applet using <a href="http://processing.org">processing<a> to see how it worked. The spiral is a simple <code>exp(0.105x)</code> with a randomness to the color. Draw around in the yellow square to try it out.
<script type="text/javascript"		src="http://www.java.com/js/deployJava.js"></script>	<script type="text/javascript">	  /* <![CDATA[ */	  var attributes = { code:'spirale.class',                             archive: '/spirale.jar',                             width:400, height:400 } ;          var parameters = { };          var version = '1.5';          deployJava.runApplet(attributes, parameters, version);          /* ]]&gt; */        </script>        	<noscript> <div>	  <!--[if !IE]> -->	  <object classid="java:spirale.class"             	  type="application/x-java-applet"            	  archive="/spirale.jar"            	  width="400" height="400"            	  standby="Loading Processing software..." >            	    <param name="archive" value="/spirale.jar" />	    	    <param name="mayscript" value="true" />	    <param name="scriptable" value="true" />	    	    <param name="image" value="loading.gif" />	    <param name="boxmessage" value="Loading Processing software..." />	    <param name="boxbgcolor" value="#FFFFFF" />	    	    <param name="test_string" value="outer" />	  <!--<![endif]-->	    <!-- For more instructions on deployment, 		 or to update the CAB file listed here, see:		 http://java.sun.com/javase/6/webnotes/family-clsid.html		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u18-windows-i586.cab"		    width="400" height="400"		    standby="Loading Processing software..."  >	      	      <param name="code" value="spirale" />	      <param name="archive" value="/spirale.jar" />	      	      <param name="mayscript" value="true" />	      <param name="scriptable" value="true" />	      	      <param name="image" value="loading.gif" />	      <param name="boxmessage" value="Loading Processing software..." />	      <param name="boxbgcolor" value="#FFFFFF" />	      	      <param name="test_string" value="inner" />	      	      <p>		<strong>		  This browser does not have a Java Plug-in.		  <br />		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">		    Get the latest Java Plug-in here.		  </a>		</strong>	      </p>	      	    </object>	    	  <!--[if !IE]> -->	  </object>	  <!--<![endif]-->	</div> </noscript>]]></description>
         <link>http://landwehr.dk/blog/2010/06/spirale_paint.html</link>
         <guid>http://landwehr.dk/blog/2010/06/spirale_paint.html</guid>
        
        
         <pubDate>Mon, 07 Jun 2010 22:07:49 +0100</pubDate>
      </item>
            <item>
         <title>A Truck in blender</title>
         <description><![CDATA[<img src="/blender/SingleTruck.jpg"/>
<img src="/blender/SingleTruckMesh.png"/>
I have created a Truck in <a href="http://blender.org">blender</a> for an illustration to my workplace. This is my very first attempt to create something real.]]></description>
         <link>http://landwehr.dk/blog/2008/12/a_truck_in_blender.html</link>
         <guid>http://landwehr.dk/blog/2008/12/a_truck_in_blender.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Misc</category>
        
        
         <pubDate>Mon, 08 Dec 2008 10:37:07 +0100</pubDate>
      </item>
            <item>
         <title>Couple of videoes with Linus</title>
         <description><![CDATA[I was amazed how fast they become big... You probably know the story :-)

Linus is here 2 months:
<object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/HbEuat13p7U"> </param> <embed src="http://www.youtube.com/v/HbEuat13p7U" type="application/x-shockwave-flash" width="425" height="350"> </embed> </object>

And here he is 5 months:
<object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/lWuE7z_4yhg"> </param> <embed src="http://www.youtube.com/v/lWuE7z_4yhg" type="application/x-shockwave-flash" width="425" height="350"> </embed> </object>]]></description>
         <link>http://landwehr.dk/blog/2008/10/couple_of_videoes_of_linus.html</link>
         <guid>http://landwehr.dk/blog/2008/10/couple_of_videoes_of_linus.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Offspring</category>
        
        
         <pubDate>Thu, 09 Oct 2008 08:15:14 +0100</pubDate>
      </item>
            <item>
         <title>Blender on Mac Mini/MacBook with Leopard</title>
         <description><![CDATA[There has been (and are) a lot of problems with <a href="http://blender.org">blender</a> running on a Mac Mini or MacBook with Leopard. The is caused by the onboard Intel graphics cards which seems not to work with double buffering. However it looks like that OpenGL programs does not need this double buffer so I have been through blender's source code and removed the references to it. A build with the modifications are available for <a href="/blender3.zip">download</a>. I'm looking forward to hear what the blender community say about the build. If the feedback are positive I will make a prober patch and submit to blender.]]></description>
         <link>http://landwehr.dk/blog/2008/03/blender_on_mac_minimacbook_wit.html</link>
         <guid>http://landwehr.dk/blog/2008/03/blender_on_mac_minimacbook_wit.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Image Processing</category>
        
        
         <pubDate>Tue, 04 Mar 2008 05:58:39 +0100</pubDate>
      </item>
            <item>
         <title>Phase One is Extreme</title>
         <description><![CDATA[<a href="http://www.phaseone.com">Phase One's</a> products sure look like craftmanship, just take a look at these crazy videos:
<div class="centering"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/tdPnMQ0eIto&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/tdPnMQ0eIto&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></div>
<div class="centering"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/PYYY9i9FUdY&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/PYYY9i9FUdY&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></div>
<div class="centering"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/e0SljqdzCNQ&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/e0SljqdzCNQ&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></div>
]]></description>
         <link>http://landwehr.dk/blog/2007/12/phase_one_is_extreme.html</link>
         <guid>http://landwehr.dk/blog/2007/12/phase_one_is_extreme.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Image Processing</category>
        
        
         <pubDate>Sat, 08 Dec 2007 13:06:07 +0100</pubDate>
      </item>
            <item>
         <title>White balancing</title>
         <description><![CDATA[I have created a small flash movie to investigate how color and white balancing works. The slider at the bottom of the movie is used to selected the white color and is a temperature slider.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="495" height="360" id="Untitled-1" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="/whitebalance.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/whitebalance.swf" quality="high" bgcolor="#ffffff" width="495" height="360" name="whitebalance" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object> ]]></description>
         <link>http://landwehr.dk/blog/2007/12/white_balancing.html</link>
         <guid>http://landwehr.dk/blog/2007/12/white_balancing.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Image Processing</category>
        
        
         <pubDate>Sun, 02 Dec 2007 22:09:31 +0100</pubDate>
      </item>
            <item>
         <title>Landwehr on the way</title>
         <description><![CDATA[Yes I'm going to be a dad and this is the first picture of the offspring in progress. I feel like I'm looking at a windows install where the progress bar is just not moving fast enough.
<div class="blog-gallery"><a href="/doozer/doozer1.jpg" rel="lightbox&#91;doozer]" title="The very first pictures of the offspring"><img src="/doozer/doozer1_tn.jpg" alt="The very first picture of the offspring"/></a><a href="/doozer/doozer2.jpg" rel="lightbox&#91;doozer]" title="The very first pictures of the offspring"><img src="/doozer/doozer2_tn.jpg" alt="The very first picture of the offspring"/></a><a href="/doozer/doozer3.jpg" rel="lightbox&#91;doozer]" title="The very first pictures of the offspring"><img src="/doozer/doozer3_tn.jpg" alt="The very first picture of the offspring"/></a></div>]]></description>
         <link>http://landwehr.dk/blog/2007/11/landwehr_on_the_way_1.html</link>
         <guid>http://landwehr.dk/blog/2007/11/landwehr_on_the_way_1.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Offspring</category>
        
        
         <pubDate>Fri, 23 Nov 2007 10:41:11 +0100</pubDate>
      </item>
            <item>
         <title>Picture Perfect Start</title>
         <description><![CDATA[I have decided to give XForms a rest and try something completely different. I'm starting to work for a danish company called <a href="http://www.phaseone.com">PhaseOne</a> where I will do image processing. I'm very excited about this as PhaseOne has an excellent professional image processing software. I'm starting just after New Year and ...

I'm hoping for a Picture Perfect Start :-)]]></description>
         <link>http://landwehr.dk/blog/2007/10/picture_perfect_start.html</link>
         <guid>http://landwehr.dk/blog/2007/10/picture_perfect_start.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">Image Processing</category>
        
        
         <pubDate>Wed, 31 Oct 2007 16:02:13 +0100</pubDate>
      </item>
            <item>
         <title>XForms and sorting</title>
         <description><![CDATA[One problem that keeps popping up when creating forms with XForms is the lack of sorting. I wrote a simple sorting extension which was mostly just taken from XSLT and <a href="http://exforms.org/sorting.html">published it on exforms.org</a>. However this is only useful then the XForms implementation has support for the extension and often is will not. But many times there are alternatives and in this blog post I will describe how one can possible do sorting in the Firefox XForms extension.

There is two places where one might want to sort; either in the UI or in the instance it-self. Because of the way XPath works it is difficult to only sort in the UI as it changes the behavior of XPath and might mess up the rest of the context update routine in XForms. Here I will demonstrate how to solve sorting by sorting an instance.

In this example we will have a model which contains two instances:
<ol>
  <li>data document which we want to sort</li>
  <li>the stylesheet document</li>
</ol>

We keep the stylesheet that do the sorting in an instance because it will allow us to change its behavior from XForms by altering attributes and content.

Without futher ado I give you the model:
<pre><code>&lt;xf:model>
  &lt;xf:instance id="default-instance">
    &lt;data xmlns="">
      &lt;item>
        &lt;name>B-item&lt;/name>
        &lt;date>2001-05-03&lt;/date>
      &lt;/item>
      &lt;item>
        &lt;name>A-item&lt;/name>
        &lt;date>2005-05-03&lt;/date>
      &lt;/item>
      &lt;item>
        &lt;name>Z-item&lt;/name>
        &lt;date>2003-05-03&lt;/date>
      &lt;/item>
      &lt;item>
        &lt;name>D-item&lt;/name>
        &lt;date>2002-05-03&lt;/date>
      &lt;/item>
    &lt;/data>
  &lt;/xf:instance>
          
  &lt;xf:instance id="stylesheet">
    &lt;xsl:stylesheet
      xmlns="" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      version="1.0">
      &lt;xsl:template match="/">
        &lt;data>
          &lt;xsl:apply-templates select="data/item">
            &lt;xsl:sort type="string" select="name"/>
          &lt;/xsl:apply-templates>
        &lt;/data>
      &lt;/xsl:template>
                  
      &lt;xsl:template match="*|@*|text()">
        &lt;xsl:copy>
          &lt;xsl:apply-templates select="*|text()|@*"/>
        &lt;/xsl:copy>
      &lt;/xsl:template>
    &lt;/xsl:stylesheet>
  &lt;/xf:instance>
&lt;/xf:model></code></pre>

Here the instance we want to sort is the first and we have the XSLT stylesheet for doing the actual sort as the second instance. Now all we need is a script which will take the XSLT stylesheet and the instance, sort and then insert the sorted instance back into the model. Then the model must be updated and that is it. The script for doing this goes as follows:
<pre><code>function sort_instance(id) {
  // We get the instance element
  var instanceElement = document.getElementById(id);
  if (instanceElement!=null) {
    // XForms exposes the retrival of the instance document from the model element which *should*
   // be the parent for the instance element.
   var instance = instanceElement.parentNode.getInstanceDocument(id);
   if (instance!=null) {
      // Now creating the stylesheet, for this example the stylesheet document is also an instance
      // by it can be loaded from many difference sources
      var xslDom = instanceElement.parentNode.getInstanceDocument('stylesheet');
			
      // create an XSLTProcessor and attach the stylesheet
      var processor = new XSLTProcessor()
      processor.importStylesheet(xslDom);
	
      // now we do the sorting transformation
      var resultDom = processor.transformToDocument(instance, instance);
			
      // we then move the result info the instance dom
      instance.removeChild(instance.documentElement);
      instance.appendChild(resultDom.documentElement);
			
      // and performs the updates for XForms
      instanceElement.parentNode.rebuild();
      instanceElement.parentNode.recalculate();
      instanceElement.parentNode.revalidate();
      instanceElement.parentNode.refresh();
    }
  }
}</code></pre>
This script can then be called from e.g. an anchor like <code>&lt;a href="javascript:sort_instance('default-instance')">sort&lt;/a></code>. The full example can be downloaded or tried from <a href="/forms/sortwithxslt.xhtml">here</a>.]]></description>
         <link>http://landwehr.dk/blog/2007/06/xforms_and_sorting_1.html</link>
         <guid>http://landwehr.dk/blog/2007/06/xforms_and_sorting_1.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">XForms</category>
        
        
         <pubDate>Sat, 02 Jun 2007 11:16:31 +0100</pubDate>
      </item>
            <item>
         <title>Picax Web Album</title>
         <description><![CDATA[<a href="/links/picax_big.png" rel="lightbox" title="Picax Web Album"><img src="/links/picax.png" alt="Picax Web Album" class="image-right"/></a>I have created a AJAX library and <a href="https://sourceforge.net/projects/picax">released it under GPL</a> to be used for publishing Picasa albums on webpages in a simple way. The XML files generated by Picasa is used directly and is attached to the gallery's album tab by adding an entry in another XML file.

I wrote this Picax gallery software for two reasons:

<ol><li>I needed a gallery for my site</li><li>I wanted to make a real AJAX application to compare it with XForms/a declarative approach.</li></ol>

Now creating Picax was no problem but even under development I got confused about the element layout because it was created in the script. I kept making the structure in html and then converted that to script. Using a declarative approach I would have been able to directly express the structures and would have made it much simple to extend and maintain the application. For my next project I will redo the Picax in XForms+XHTML and make a real comparison between the two methods.

For now feel free to use the gallery on your site, if you like me, are a user of Picasa and want to publish your pictures on the web.]]></description>
         <link>http://landwehr.dk/blog/2007/03/picax_web_album.html</link>
         <guid>http://landwehr.dk/blog/2007/03/picax_web_album.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">XForms</category>
        
        
         <pubDate>Thu, 22 Mar 2007 12:32:23 +0100</pubDate>
      </item>
            <item>
         <title>PicoForms Releases New Site</title>
         <description><![CDATA[<a href="/links/picoforms_big.png" rel="lightbox" title="PicoForms WebSite"><img src="/links/picoforms.png" alt="Screenshot of the PicoForms WebSite" class="image-right"/></a><a href="http://picoforms.com">PicoForms</a>, the company I work for, has released a new website which contains a complete make over of the design but more importantly demos of the products we have. There is a great demo of the MIDP implementation (at PicoForms we call this the Micro Edition Browser) which uses several back-end WebServices to retrieve data directly from the forms using <a href="http://www.w3.org/TR/soap/">SOAP</a>. There is also a WebStart demo of the Personal Edition Browser, which currently only have one demo form but a good one since it is the Tax Form from the Mozilla XForms Project.

Check it all out on <a href="http://picoforms.com">http://picoforms.com</a>.


]]></description>
         <link>http://landwehr.dk/blog/2007/02/picoforms_releases_new_site.html</link>
         <guid>http://landwehr.dk/blog/2007/02/picoforms_releases_new_site.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">XForms</category>
        
        
         <pubDate>Wed, 28 Feb 2007 12:55:06 +0100</pubDate>
      </item>
            <item>
         <title>XForms, XForms Tiny and Web Forms 2</title>
         <description><![CDATA[There have been a lot of debate about <a href="http://www.w3.org/tr/xforms">XForms</a> and the <a  href="http://www.whatwg.org">whatwg</a> <a href="http://www.whatwg.org/specs/web-forms/current-work/">Web Forms 2</a> initiative. At the moment the subject is hotter than ever since the XForms working group has to be <a href="http://www.w3.org/2006/11/forms-charter.html">rechartered</a>. In this new charter is a proposal from XForms to create a XForms Tiny version which will assimilate the <a href="http://www.whatwg.org/specs/web-forms/current-work/">Web Forms 2</a> syntax but be convertible to XForms by e.g. a XSLT transformation. Dave Raggett has been a key driver for this and have created a <a href="http://www.w3.org/2006/11/XForms-Tiny/">prototype</a> of such a language which is based upon a JavaScript library. This is in short words the history behind a longer discussion on the <a href="http://lists.w3.org/Archives/Public/www-forms/2007Jan/0001.html">www-forms</a> mailing list where a comparison has been made between XForms Tiny (as proposed and implemented by Dave Raggett) and Web Forms 2. 

I have been a member of the XForms working group through many years now and have to air my concerns for the proposed route in the new XForms charter. Therefore I send a member only mail to the working group which I now choose to publish on my blog:
<code>
It seems from the public discussion that we are starting to have a notion of XForms Tiny and XForms Full. For an implementor which have an XForms 1.0 processor this is a problem as the language between tiny and full are very different and will actual require two code bases. This is a problem for implementations which has strict requirements to code size which is the case for mobile solutions. Furthermore a mobile solution is very unlikely to support JavaScript and will not be able to use an open source library since that would require support for not only a JavaScript engine but also the exposure of standard interface, e.g. to the DOM (again this will increase the code base). It is unlikely that customers will understand that XForms Tiny is something completely different from XForms "Full" and that it would not be possible to "just get the tiny profile". In other specification from w3c the difference between full and tiny is usually defined as a logical subset of features (e.g. SVG and CSS).</code>
<code>
I have repeatedly asked for a reason we do this XForms Tiny work and have not received a clear answer other than "we do this before somebody else do it for us". But frankly there are lot of open source frameworks out there and even though XFT is really cool and uses many of the same design criteria as XForms did, it seems it has little to do with the work we previously have done in XForms and hence the naming is very misleading.</code>
<code>
It is clear the XForms will not be mainstream as HTML Forms and it will never find its way to the "please contact me" form. It is also clear that it is that kind of functionality WF2 tries to enhance which make perfect sense in an evolutionary way. In XForms we provide some pretty complex semantic constructs which enables authors to describe relationships between data and between data and UI. This is what we call the processing model and it is what makes XForms worth while. This processing model makes it possible to declaratively describe entire applications with a rich UI only based upon data. This is the real difference between XForms and Tine/WF2 (e.g. the processing model vs. event based updates) not some syntactic sugar as element names or if the label is inside or outside the form control element and what a repeating structure means. This is also why XForms should not standardize on XForms Tiny as it is put out today but consider a normal w3c profiling of the "full" version.</code>
<code>
In the working group we put a lot of effort in discussion political positing of XForms. It seem the original goal has been to replace HTML Forms (which is quite clear as the specification originates from xhtml). Because of the complex design requirements put out for XForms the goal will not be meet simply because XForms *did* fulfill these requirements but as a side effect made the language to complicated for simple use. Attempts to argument that XForms is not complicated by creating examples like a simply search has been put out there on the web. But when it comes down to grasp XForms in entirety we must face the fact that it is complicated but at the same time extremely powerful.
So when we discuss chameleon namespaces because we want to reach out for the simple usecases we are wasting our time. People using XForms understand constructs as namespaces as they will come with an XML background e.g. from XSLT, XPath, XMLSchema, SVG or ... If they do not come with this background it is unlikely that they would choose XForms over something like an open source JavaScript widget library. We should therefore focus on creating the many improvements we really need in XForms to make the users of XForms happier and not try to please a crowd which does not like the smell of XML. </code>
----------------]]></description>
         <link>http://landwehr.dk/blog/2007/02/xforms_xforms_tiny_and_web_for_1.html</link>
         <guid>http://landwehr.dk/blog/2007/02/xforms_xforms_tiny_and_web_for_1.html</guid>
                  <category domain="http://www.sixapart.com/ns/types#category">XForms</category>
        
                  <category domain="http://www.sixapart.com/ns/types#tag">whatwg</category>
                  <category domain="http://www.sixapart.com/ns/types#tag">XForms</category>
                  <category domain="http://www.sixapart.com/ns/types#tag">XForms Tiny</category>
        
         <pubDate>Wed, 07 Feb 2007 10:57:59 +0100</pubDate>
      </item>
      
   </channel>
</rss>
