<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>David Landwehr&apos;s blog</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/" />
   <link rel="self" type="application/atom+xml" href="http://landwehr.dk/blog/atom.xml" />
   <id>tag:landwehr.dk,2008:/blog//1</id>
   <updated>2008-12-08T09:44:58Z</updated>
   
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.33</generator>

<entry>
   <title>A Truck in blender</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2008/12/a_truck_in_blender.html" />
   <id>tag:landwehr.dk,2008:/blog//1.14</id>
   
   <published>2008-12-08T09:37:07Z</published>
   <updated>2008-12-08T09:44:58Z</updated>
   
   <summary> I have created a Truck in blender for an illustration to my workplace. This is my very first attempt to create something real....</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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.]]>
      
   </content>
</entry>
<entry>
   <title>Couple of videoes with Linus</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2008/10/couple_of_videoes_of_linus.html" />
   <id>tag:landwehr.dk,2008:/blog//1.13</id>
   
   <published>2008-10-09T07:15:14Z</published>
   <updated>2008-10-09T07:26:06Z</updated>
   
   <summary>I was amazed how fast they become big... You probably know the story :-) Linus is here 2 months: And here he is 5 months:...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Offspring" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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>]]>
      
   </content>
</entry>
<entry>
   <title>Blender on Mac Mini/MacBook with Leopard</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2008/03/blender_on_mac_minimacbook_wit.html" />
   <id>tag:landwehr.dk,2008:/blog//1.12</id>
   
   <published>2008-03-04T04:58:39Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>There has been (and are) a lot of problems with blender 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...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Image Processing" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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.]]>
      
   </content>
</entry>
<entry>
   <title>Phase One is Extreme</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/12/phase_one_is_extreme.html" />
   <id>tag:landwehr.dk,2007:/blog//1.11</id>
   
   <published>2007-12-08T12:06:07Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>Phase One&apos;s products sure look like craftmanship, just take a look at these crazy videos:...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Image Processing" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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>
]]>
      
   </content>
</entry>
<entry>
   <title>White balancing</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/12/white_balancing.html" />
   <id>tag:landwehr.dk,2007:/blog//1.10</id>
   
   <published>2007-12-02T21:09:31Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>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....</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Image Processing" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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> ]]>
      
   </content>
</entry>
<entry>
   <title>Landwehr on the way</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/11/landwehr_on_the_way_1.html" />
   <id>tag:landwehr.dk,2007:/blog//1.9</id>
   
   <published>2007-11-23T09:41:11Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>Yes I&apos;m going to be a dad and this is the first picture of the offspring in progress. I feel like I&apos;m looking at a windows install where the progress bar is just not moving fast enough....</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Offspring" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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>]]>
      
   </content>
</entry>
<entry>
   <title>Picture Perfect Start</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/10/picture_perfect_start.html" />
   <id>tag:landwehr.dk,2007:/blog//1.8</id>
   
   <published>2007-10-31T15:02:13Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>I have decided to give XForms a rest and try something completely different. I&apos;m starting to work for a danish company called PhaseOne where I will do image processing. I&apos;m very excited about this as PhaseOne has an excellent professional...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Image Processing" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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 :-)]]>
      
   </content>
</entry>
<entry>
   <title>XForms and sorting</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/06/xforms_and_sorting_1.html" />
   <id>tag:landwehr.dk,2007:/blog//1.6</id>
   
   <published>2007-06-02T10:16:31Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>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 published it on exforms.org. However this is only useful then...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="XForms" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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>.]]>
      
   </content>
</entry>
<entry>
   <title>Picax Web Album</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/03/picax_web_album.html" />
   <id>tag:landwehr.dk,2007:/blog//1.5</id>
   
   <published>2007-03-22T11:32:23Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>I have created a AJAX library and released it under GPL 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&apos;s album...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="XForms" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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.]]>
      
   </content>
</entry>
<entry>
   <title>PicoForms Releases New Site</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/02/picoforms_releases_new_site.html" />
   <id>tag:landwehr.dk,2007:/blog//1.4</id>
   
   <published>2007-02-28T11:55:06Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>PicoForms, 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...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="XForms" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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>.


]]>
      
   </content>
</entry>
<entry>
   <title>XForms, XForms Tiny and Web Forms 2</title>
   <link rel="alternate" type="text/html" href="http://landwehr.dk/blog/2007/02/xforms_xforms_tiny_and_web_for_1.html" />
   <id>tag:landwehr.dk,2007:/blog//1.3</id>
   
   <published>2007-02-07T09:57:59Z</published>
   <updated>2008-10-09T07:23:02Z</updated>
   
   <summary>There have been a lot of debate about XForms and the whatwg Web Forms 2 initiative. At the moment the subject is hotter than ever since the XForms working group has to be rechartered. In this new charter is a...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="XForms" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="7" label="whatwg" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="4" label="XForms" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="6" label="XForms Tiny" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://landwehr.dk/blog/">
      <![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>
----------------]]>
      
   </content>
</entry>

</feed>
