<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-942981743092000078</id><updated>2012-02-26T13:39:21.044-08:00</updated><category term='Geeky'/><category term='XML'/><category term='Android'/><category term='Java'/><category term='Business IT'/><category term='Validation'/><category term='Web'/><title type='text'>Petr Nálevka's Technology Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-3859854266932561845</id><published>2011-10-18T13:08:00.000-07:00</published><updated>2011-11-14T08:13:04.811-08:00</updated><title type='text'>Sleep as Android at GDD 2011 Prague</title><content type='html'>Recently I had the opportunity to present Sleep as anDroid and other apps the Urbandroid team does at Google Developer Day 2011 in Prague as part of the keynotes. Hope you like my sleeping hat.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;a href="http://www.youtube.com/watch?v=nwoGhGZ6fc0" style="color: #074d8f;" target="_blank"&gt;http://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=nwoGhGZ6fc0&lt;/a&gt;&amp;nbsp;(my bit starts at 19th minute 30th second)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/nwoGhGZ6fc0/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/nwoGhGZ6fc0&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/nwoGhGZ6fc0&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-8rH9FW8Ahp4/Tp3ckSTu7hI/AAAAAAAAL2w/tarSbygWofw/s1600/image2993-ex.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="297" src="http://3.bp.blogspot.com/-8rH9FW8Ahp4/Tp3ckSTu7hI/AAAAAAAAL2w/tarSbygWofw/s400/image2993-ex.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-3859854266932561845?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/3859854266932561845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2011/10/hello-i-had-opportunity-to-present.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/3859854266932561845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/3859854266932561845'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2011/10/hello-i-had-opportunity-to-present.html' title='Sleep as Android at GDD 2011 Prague'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-8rH9FW8Ahp4/Tp3ckSTu7hI/AAAAAAAAL2w/tarSbygWofw/s72-c/image2993-ex.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-7233557303011640371</id><published>2011-09-19T04:34:00.000-07:00</published><updated>2011-09-19T04:40:34.424-07:00</updated><title type='text'>Synchronize your IDE with Google Docs for you Google Phone interview</title><content type='html'>I had a phone interview with Google recently. When I prepared for the interview I tried to write code in Google Docs and was very much missing all the features of my IDE.&lt;br /&gt;&lt;br /&gt;Maybe someone else may find my simple code snippet below useful. It does auto-synchronize you local file with the Google Document shared for you interview. So whenever you save the file in the IDE it gets uploaded to Docs so that you interview can see what you wrote. At the same time you have full code-completion/generation and the code does also syntax highlighting through JHighlight.&lt;br /&gt;&lt;br /&gt;Here is the result:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-B6Dqeg7dI_I/TncpSplmBQI/AAAAAAAALx4/QufJUSGphz4/s1600/Screenshot-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://2.bp.blogspot.com/-B6Dqeg7dI_I/TncpSplmBQI/AAAAAAAALx4/QufJUSGphz4/s320/Screenshot-4.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In order to make it working you need to put your self to the sharing list (which you can do), otherwise there would be a permission error. If anyone would like to improve the code, back-synchronization of what the interviewer writes would be great.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package com.urbandroid.gdata;&lt;br /&gt;&lt;br /&gt;import com.google.gdata.client.docs.DocsService;&lt;br /&gt;import com.google.gdata.data.MediaContent;&lt;br /&gt;import com.google.gdata.data.docs.DocumentListEntry;&lt;br /&gt;import com.google.gdata.data.docs.DocumentListFeed;&lt;br /&gt;import com.google.gdata.data.media.MediaByteArraySource;&lt;br /&gt;import com.google.gdata.data.media.MediaSource;&lt;br /&gt;&lt;br /&gt;import com.uwyn.jhighlight.renderer.JavaXhtmlRenderer;&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;import java.net.URL;&lt;br /&gt;import java.text.SimpleDateFormat;&lt;br /&gt;import java.util.Date;&lt;br /&gt;&lt;br /&gt;public class UpdateDocument {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public static void main(String[] args) throws Exception {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UpdateDocument updater = new UpdateDocument();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File file = new File(args.length == 1 ? args[0] : "/home/petr/project/google/src/Interview.java");&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JavaXhtmlRenderer renderer = new JavaXhtmlRenderer();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SimpleDateFormat dateFormat = new SimpleDateFormat("hh:mm:ss");&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long modified = -1;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (true) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (modified != file.lastModified()) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; modified = file.lastModified();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println("File modified...");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ByteArrayOutputStream out = new ByteArrayOutputStream();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; renderer.highlight("GPhoneInterview by Petr Nalevka, last update: " + dateFormat.format(new Date()), new FileInputStream(file), out, "UTF-8", false);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updater.update(new ByteArrayInputStream(out.toByteArray()), "Phone Interview");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thread.sleep(1500);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public void update(InputStream in, String titleSubstring) throws Exception {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DocsService client = new DocsService("PetrNalevka-DocSync-v1");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; client.setUserCredentials("petr.nalevka@gmail.com", PassProvider.PASSWORD);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL feedUri = new URL("http://docs.google.com/feeds/default/private/full/");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DocumentListFeed feed = client.getFeed(feedUri, DocumentListFeed.class);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DocumentListEntry found = null;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (DocumentListEntry entry : feed.getEntries()) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println("Entry: "+entry.getTitle().getPlainText());&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (entry.getTitle().getPlainText().contains(titleSubstring)) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found = entry;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (found == null) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println("Entry not found, exiting.");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found.setCanEdit(true);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MediaContent mediaContent = (MediaContent) found.getContent();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MediaSource mediaSource = client.getMedia(mediaContent);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found.setMediaSource(mediaSource);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String page = InputStreamUtil.read(in);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mediaContent.setMediaSource(new MediaByteArraySource(page.getBytes(), DocumentListEntry.MediaType.HTM.getMimeType()));&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // shared documents do not provide edit link?&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL url;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (found.getEditLink() != null) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url = new URL(found.getEditLink().getHref());&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url = new URL("http://docs.google.com/feeds/default/private/full/document%3A"+found.getDocId());&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println("Updating URL: " + url);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; client.updateMedia(url, found);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ignore, hack because GData returns error on shared documents, but update works&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-7233557303011640371?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/7233557303011640371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2011/09/synchronize-your-ide-with-google-docs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/7233557303011640371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/7233557303011640371'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2011/09/synchronize-your-ide-with-google-docs.html' title='Synchronize your IDE with Google Docs for you Google Phone interview'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-B6Dqeg7dI_I/TncpSplmBQI/AAAAAAAALx4/QufJUSGphz4/s72-c/Screenshot-4.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-4806147107156076107</id><published>2010-11-03T06:46:00.000-07:00</published><updated>2011-09-19T04:39:26.132-07:00</updated><title type='text'>Sleep as an Droid</title><content type='html'>There is a new android application form our workshop. Sleep as an Droid is a bio-alarm clock tracking your sleep cycles and waking you up in the light sleep phase for a smoother morning experience and more energy during your day. Working with accelerometers is also an interesting research which has many potentially interesting medical applications. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-4a6JQJIpXC4/Tncp2PXFd2I/AAAAAAAALx8/RqF8C4G4yhE/s1600/high-res-icon.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/-4a6JQJIpXC4/Tncp2PXFd2I/AAAAAAAALx8/RqF8C4G4yhE/s200/high-res-icon.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="https://sites.google.com/site/sleepasandroid/"&gt;https://sites.google.com/site/sleepasandroid/&lt;/a&gt;&lt;br /&gt;&lt;a href="https://market.android.com/details?id=com.urbandroid.sleep&amp;amp;feature=search_result"&gt;https://market.android.com/details?id=com.urbandroid.sleep&amp;amp;feature=search_result&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-4806147107156076107?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/4806147107156076107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/11/sleep-as-droid.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/4806147107156076107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/4806147107156076107'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/11/sleep-as-droid.html' title='Sleep as an Droid'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-4a6JQJIpXC4/Tncp2PXFd2I/AAAAAAAALx8/RqF8C4G4yhE/s72-c/high-res-icon.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-6885085897124805301</id><published>2010-08-30T10:15:00.000-07:00</published><updated>2010-08-30T10:15:50.714-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>New version of MHDroid</title><content type='html'>Me and my colleague Martin, we have just released a new version of the MHDroid application for finding your way through public transport in Czech republic using your Android phone. For more info see &lt;a href="http://https//sites.google.com/site/androidmhdroid/home"&gt;https://sites.google.com/site/androidmhdroid/home&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-6885085897124805301?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/6885085897124805301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/08/new-version-of-mhdroid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/6885085897124805301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/6885085897124805301'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/08/new-version-of-mhdroid.html' title='New version of MHDroid'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-5682903757562408390</id><published>2010-08-30T10:09:00.000-07:00</published><updated>2010-08-30T10:11:56.179-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Geeky'/><title type='text'>Building my first robot</title><content type='html'>&lt;p&gt;No need to clean my floor anymore. Here are my cleaning robots version 1 and 2. The ultimate version 3 is coming soon. The robot uses the PICAXE controller and an analog IR distance sensor.&lt;/p&gt;&lt;h1&gt;Version 1&lt;/h1&gt;&lt;object width="420" height="325"&gt;&lt;param name="movie" value="http://www.youtube.com/v/rKDmz64SYuo?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/rKDmz64SYuo?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="420" height="325"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;h1&gt;Version 2&lt;/h1&gt;&lt;object width="420" height="325"&gt;&lt;param name="movie" value="http://www.youtube.com/v/uA-Jg0Bb6-c?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/uA-Jg0Bb6-c?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="420" height="325"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-5682903757562408390?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/5682903757562408390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/08/building-my-first-robot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/5682903757562408390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/5682903757562408390'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/08/building-my-first-robot.html' title='Building my first robot'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-1322746915668636466</id><published>2010-05-27T11:20:00.001-07:00</published><updated>2010-05-27T11:34:53.594-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Geeky'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Artificial Market Simulations using Multi-agent Systems</title><content type='html'>&lt;div class="content-article" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="subtitle"&gt;&lt;i&gt;Commodity Market Trader Strategies&lt;/i&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-author"&gt;&lt;h3 class="content-author"&gt;&lt;span class="firstname"&gt;Petr&lt;/span&gt; &lt;span class="surname"&gt;Nálevka&lt;/span&gt;&lt;/h3&gt;&lt;div class="content-affiliation"&gt;&lt;span class="content-orgname"&gt;University of Economics, Prague&lt;/span&gt; &lt;span class="content-orgdiv"&gt;Department of Information and Knowledge Engineering ­̶        Knowledge Engineering Group&lt;/span&gt;&lt;br /&gt;&lt;div class="content-address"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="street"&gt;W.&amp;nbsp;Churchill&amp;nbsp;Sq.&amp;nbsp;4&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="city"&gt;130&amp;nbsp;67&amp;nbsp;Praha&amp;nbsp;3&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="country"&gt;Czech&amp;nbsp;Republic&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class="content-email" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;a href="mailto:petr@nalevka.com"&gt;petr@nalevka.com&lt;/a&gt;&lt;/code&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-abstract"&gt;&lt;div class="title"&gt;&lt;b&gt;Abstract&lt;/b&gt;&lt;/div&gt;This paper is an introduction into how to build simple multi agent      market simulations. It explains the used approaches techniques and      algorithms.&lt;br /&gt;It focuses in particular on a commodity market with double auction      price evaluation. Commodity market is studied with different      trader/agent types.&lt;br /&gt;Price development is studied for normal utility driven consumer      traders as a reference environment. Later different agent types are      added to observe how do they affect the market development.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;div class="toc"&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.intro"&gt;Introduction&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.commodity.market"&gt;Commodity Market&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e76"&gt;Double Auction&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e89"&gt;The Simulation&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e107"&gt;Parameters&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.reference"&gt;The Reference Model&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.price"&gt;Price Evaluation&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.visualization"&gt;Visualization&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e695"&gt;Computerized trading&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e728"&gt;Computer Traders&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.reference.setup"&gt;The Reference Setup&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e868"&gt;Adding Computerized Traders&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1001"&gt;Market Failures&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1022"&gt;Trend Trader&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1251"&gt;Consumer and Trend Traders&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1401"&gt;All Trader Types Together&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1582"&gt;Conclusion&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="appendix"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#appendix.implementation"&gt;A. Implementation&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="bibliography"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#biblio"&gt;Bibliography&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="section.intro"&gt;&lt;/a&gt;Introduction&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;This paper demonstrates how to use multi-agent systems to simulate    phenomena emerging from interaction of individuals in market environments.    Market is a complex system. It may be studied analytically using formal    models but modelling markets in all their complexity is not possible. A    model is always highly simplified and thus the observed may significantly    differ from the predicted.&lt;br /&gt;As an example, take in consideration all sort of different market    failures we observe in every day reality but they are not deduced from the    formal models used in classical economy. The reason obviously is, features    causing the failures are not included in the model.&lt;br /&gt;With computerized simulation we may observe features which may be    lost in traditional formal modelling. With agents we are able to simulate    behaviour of every individual agent in every computational step. This    corresponds to real markets, where individuals and their asynchronous    interaction form bottom-up the aggregated market behaviour. With    computerized simulation we are able to process a state space which is    bigger than what we would be able to study analytically.&lt;br /&gt;On the other hand this comes with a trade-off. In contrast to formal    models which may be completely understood, proved and which may be used to    predict future development, simulation is partially a black box for the    observer. We only define parameters of the agents and we set the state    space frontiers and we let features to emerge. But analysing why are    things happening in a certain way or predicting further development is not    as straightforward [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1723" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;1&lt;/span&gt;&lt;/a&gt;] [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1730" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;2&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;This is caused because of the huge state space the simulation is    working with. All paths can hardly be followed by the observer. Of course    some visualization techniques may significantly help understand the    processes in deep, but usually we have to deduce the cause of a certain    behaviour from the initial parameters and some highly aggregated output    data.&lt;br /&gt;The aim of this paper is to use the simulation techniques to examine    a commodity market with different kinds of traders and how do their    strategies influence the overall market price evaluation. The objective is    to find some interesting consequences of those strategies especially in    respect to market failures which are difficult to deduce from formal    models and thus a computerized simulation is an interesting alternative to    study those phenomena.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="section.commodity.market"&gt;&lt;/a&gt;Commodity Market&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The commodity market is an interesting candidate to be studied using    simulation techniques. Apart from the additional complexity we may    introduce using those techniques, the commodity market is not studied so    intensively as most of the published papers focus on different market    types mostly on the stock exchange. This means it is more likely to find    some interesting discovery.&lt;br /&gt;Another reason are the moral concerns regarding commodity markets    which are closely related to market failures. Commodity markets trade raw    commodities including raw agricultural output which are essential for    basic human survival&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e68" id="d290e68"&gt;1&lt;/a&gt;]&lt;/sup&gt;. Consequences of a massive commodity market failure may be    fatal including starving, riots, political instability, war etc...&lt;br /&gt;A recent example of the threats of the commodity market is the 2008    rice price rise, where the prices went up 50% in two months and they    doubled since 2004. This affair threatened political stability in many    developing countries.&lt;br /&gt;The moral dimension is especially emphasized when we realize that    some traders enter the market to deliver goods to their customers who need    it for their living, but others may only use the market itself as a way to    generate profit. Interesting questions arise especially when we ask how    does the second group of traders influence the market and what are the    consequences for the first group.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e76"&gt;&lt;/a&gt;Double Auction&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Double auction is one of the market models for price evaluation    which is based on the classical market demand and supply model. Nowadays    it is a common model for all sort of different markets    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1723" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;1&lt;/span&gt;&lt;/a&gt;]. Sellers and buyers both submit their bids. Based    on the demand and supply, the auctioneer chooses a price which clears the    market. This is the market price of the commodity at the time and also the    price which is used to process all the trade transactions.&lt;br /&gt;Due to large multiplicity of equilibria, analytical studies of the    double auction markets are quite difficult [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1730" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;2&lt;/span&gt;&lt;/a&gt;]. That's    why simulation is a good alternative for studying this type of markets.    The multi-agent simulation described in this article uses the double    auction mechanism for determining price and executing trade    transactions.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e89"&gt;&lt;/a&gt;The Simulation&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The simple multi-agent commodity market simulation has been    implemented as part of this paper. This section describes generic    principles on the simulation environment and main parameters.    Implementation details are described in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#appendix.implementation" title="A. Implementation" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Appendix&amp;nbsp;A, &lt;i xmlns:xlink="http://www.w3.org/1999/xlink"&gt;Implementation&lt;/i&gt;&lt;/a&gt;.&lt;br /&gt;The simulation consists of a collection of traders who may become    buyers as well as sellers. There may be different kinds of traders in the    simulation as they may differ in how they convert market signals into    bids.&lt;br /&gt;The simulation executes in &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;rounds&lt;/em&gt;&lt;/span&gt;. Each round    starts with harvest. The current harvest level is the only exogenous    variable in the system. It is determined randomly. One of the trader types    participating in the simulation are considered to be farmers and harvest    is divided between them randomly.&lt;br /&gt;In the next phase, the generated commodity is being traded using the    double auction model. The market is cleared in one computational step.    Each commodity unit offered for a price lower than the clearing price for    the current round is sold to someone offering more.&lt;br /&gt;After the market gets cleared agents may consume their commodities    or keep them for further trading and another round begins. During the    execution of a round, statistical mostly aggregated data are collected and    visualized to give an overview what is going on it the market and how are    different trader types doing.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e107"&gt;&lt;/a&gt;Parameters&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The commodity market simulation is parameterizable. Different      parameters may significantly influence the simulation execution and the      behavior of the market. Parameters may be set either globally for the      simulation environment as a whole or for individual trader types.&lt;br /&gt;&lt;div class="content-variablelist"&gt;&lt;div class="title"&gt;&lt;b&gt;Global Simulation Parameters&lt;/b&gt;&lt;/div&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="term"&gt;Number of traders&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;For each trader group number of traders who participate in            the simulation may be set. Important is the ratio of different            trader groups participating but also the absolute number. The more            traders participate the more complex market we simulate. With more            traders the date get smoother and our model is less vulnerable to            random deviations of parameters. On the other hand more traders            means less performance and slower computation.&lt;/dd&gt;&lt;dt&gt;&lt;span class="term"&gt;Harvest&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;Harvest is a strong exogenous factor which influences            equilibrium prices. In the simulation, harvest is a purely random            variable which is controlled through 4 boundary parameters. Those            define interval for the lowest and the highest possible number of            commodities each farmers may become every round. The intervals are            determined each round. In case the intervals are larger, the total            harvest amount may fluctuate significantly.&lt;br /&gt;In case we choose the same minimum and maximum amount of            commodity for each round the harvest total is more or less stable            culminating around an average&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e129" id="d290e129"&gt;2&lt;/a&gt;]&lt;/sup&gt;.&lt;/dd&gt;&lt;dt&gt;&lt;span class="term"&gt;Budget&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;The budget parameter sets an interval for initial budgets            for each traders which is determined randomly.&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="section.reference"&gt;&lt;/a&gt;The Reference Model&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The reference model is a simulation setup which is used as      starting point. It is composed of only one trader type which is called      the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Trader&lt;/em&gt;&lt;/span&gt;. This trader is driven only by      it's marginal utility function which determines it's preferences for the      given commodity.&lt;br /&gt;The reference model simulates the market the way it would be if it      is free of any profiteers. The participating traders are all interested      in the commodity for their own consumption. Each of the traders has a      different marginal utility function. It is a linear descending function      determined by two parameters which are randomly generated for each agent      at the beginning of the simulation.&lt;br /&gt;&lt;div class="equation"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e150"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Equation&amp;nbsp;1.&amp;nbsp;Utility function&lt;/b&gt;&lt;/div&gt;&lt;div class="equation-contents"&gt;&lt;span class="content-mathphrase"&gt;MU = - P&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;1&lt;/sub&gt; . Q +          P&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;2&lt;/sub&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;MU&lt;/code&gt; stands for marginal utility,      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;P&lt;sub&gt;1&lt;/sub&gt;&lt;/code&gt; and      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;P&lt;sub&gt;2&lt;/sub&gt;&lt;/code&gt; are the parameters which      determine the trader's preferences and &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt; is the      amount of the commodity the trader is holding.&lt;br /&gt;Each &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Trader&lt;/em&gt;&lt;/span&gt; is a farmer at the same      time. He gets an random amount of commodity each round. Next he buys or      sells commodity units on the market and finally all his commodity stock      gets consumed.&lt;br /&gt;The marginal utility function is the base for determining each      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Trader&lt;/em&gt;&lt;/span&gt; bids. The algorithm is based on the      basics of the customer preferences theory [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1767" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;7&lt;/span&gt;&lt;/a&gt;]. The      price, traders are willing to pay for an additional unit of the      commodity &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt; equals to the &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;MU&lt;/code&gt;      calculated for &lt;span class="content-mathphrase"&gt;Q + 1&lt;/span&gt;. The price, which needs to be paid to buy the last      commodity unit from a trader equals at least to &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;MU&lt;/code&gt;      calculated for &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt;.&lt;br /&gt;An agent places sell bids for all the commodity units he      possesses&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e209" id="d290e209"&gt;3&lt;/a&gt;]&lt;/sup&gt; and at the same time he places buy bids until he reaches      his budget limits&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e213" id="d290e213"&gt;4&lt;/a&gt;]&lt;/sup&gt;. The process is demonstrated in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#example.customer.trader.bidding" title="Example 1. Customer Trader 1 Bidding" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;1, “Customer Trader 1 Bidding”&lt;/a&gt;.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="example.customer.trader.bidding"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;1.&amp;nbsp;Customer Trader 1 Bidding&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;Imagine a &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Trader &lt;/em&gt;&lt;/span&gt;with marginal        utility function &lt;span class="content-mathphrase"&gt;MU = - 2 . Q + 35&lt;/span&gt; and a budget of 100 currency units and 5 commodity        units on stock. See the trader's bids he is placing in the current        round in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#table.ct.buy.bids" title="Trader 1 Buy Bids" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Table&amp;nbsp;1, “Trader 1 Buy Bids”&lt;/a&gt; and &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#table.ct.sell.bids" title="Trader 1 Sell Bids" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Table&amp;nbsp;2, “Trader 1 Sell Bids”&lt;/a&gt;.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e235"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;1.&amp;nbsp;Marginal Utility Function for Trader 1&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_64yRvcgVI/AAAAAAAADV8/FPKLZCv1Otw/s1600/customer.trader.mu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_64yRvcgVI/AAAAAAAADV8/FPKLZCv1Otw/s320/customer.trader.mu.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.ct.buy.bids"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Trader 1 Buy Bids&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Trader 1 Buy Bids"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Buy Bid&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;15&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e272" id="d290e272"&gt;a&lt;/a&gt;]&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;tbody class="footnotes"&gt;&lt;tr&gt;&lt;td colspan="6"&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e272" id="ftn.d290e272"&gt;a&lt;/a&gt;] &lt;/sup&gt;The next bid (number 6) would exceed the available                    budget.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.ct.sell.bids"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Trader 1 Sell Bids&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Trader 1 Sell Bids"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sell Bid&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br class="table-break" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br class="example-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="section.price"&gt;&lt;/a&gt;Price Evaluation&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;After each trader places his bids, the sell bids are ordered      ascending and buy bids descending based on the bid price. Such value      series are basically a discontinuous demand and supply function.&lt;br /&gt;The algorithm for determining the equilibrium price is simple. It      iterates both series until the sell price gets above the buy price for a      certain amount of bids. Because the function is discontinuous, the price      is determined as if the function were continuous at their      intersection.&lt;br /&gt;This price is used to clear the market satisfying all the bidders      who sell above the price and who buy under it.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e315"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;2.&amp;nbsp;Price Evaluation&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;Beside Trader 1 shown in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#example.customer.trader.bidding" title="Example 1. Customer Trader 1 Bidding" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;1, “Customer Trader 1 Bidding”&lt;/a&gt; imagine there is another        trader (Trader 2) on the market. His marginal utility function is        different &lt;span class="content-mathphrase"&gt;MU = - 8 . Q + 58, he has a budget of 175 currency            units and 2 commodity units.&lt;/span&gt;&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e325"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;2.&amp;nbsp;Marginal Utility Function of Traders 1 (blue) and Trader 2          (green)&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_643IE-i1I/AAAAAAAADWE/opMTzKMlPiU/s1600/price.eval.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_643IE-i1I/AAAAAAAADWE/opMTzKMlPiU/s320/price.eval.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="content-mediaobject"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.ct.sell.bids"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Trader 2 Buy Bids&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Trader 2 Buy Bids"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Buy Bid&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;2&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e366" id="d290e366"&gt;a&lt;/a&gt;]&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;tbody class="footnotes"&gt;&lt;tr&gt;&lt;td colspan="7"&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e366" id="ftn.d290e366"&gt;a&lt;/a&gt;] &lt;/sup&gt;This is the last possible bid with a positive                    price.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.ct.sell.bids"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Trader 2 Sell Bids&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Trader 2 Sell Bids"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sell Bid&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.ct.sell.bids"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Demand for Both Traders&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Demand for Both Traders"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Trader&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quantity&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.ct.sell.bids"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Supply for Both Traders&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Supply for Both Traders"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Trader&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quantity&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.ds"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;3.&amp;nbsp;Resulting Demand and Supply "Curve"&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_649Bt4KfI/AAAAAAAADWM/W4kIEzSXGnA/s1600/ds.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_649Bt4KfI/AAAAAAAADWM/W4kIEzSXGnA/s320/ds.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The price is determined as the intersection point if we consider        the demand and supply series as continuous curves. In &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.ds" title="Figure 3. Resulting Demand and Supply &amp;quot;Curve&amp;quot;" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;3, “Resulting Demand and Supply "Curve"”&lt;/a&gt; the join line for point &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;A&lt;/code&gt;        and &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;B&lt;/code&gt; is a function &lt;span class="content-mathphrase"&gt;P = 2 . Q + 23&lt;/span&gt; and for &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;C&lt;/code&gt; and        &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;D&lt;/code&gt; it is &lt;span class="content-mathphrase"&gt;P = -8 . x + 50&lt;/span&gt;. The intersection happens for &lt;span class="content-mathphrase"&gt;P = 28.4&lt;/span&gt; which is rounded to &lt;span class="content-mathphrase"&gt;P = 28&lt;/span&gt;.&lt;br /&gt;To conclude, in this round traders will exchange two commodity        units, both for 28 currency units. Trader 2 will buy 2 units from        Trader 1. This will decrease his budget and increase the budget of the        other trader by 56. His commodity pool will contain 4 units and the        pool of Trader 1 will decrease to 2 units.&lt;br /&gt;The total utility &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;TU&lt;/code&gt; of Trader 2 will        increase by 20, which is the difference between the utility brought by        the two additional units and the price he paid for them. The utility        gain of Trader 1 may be calculated in a similar manner. The utility        gains are in fact equivalents to the supplier and consumer        surplus.&lt;/div&gt;&lt;/div&gt;&lt;br class="example-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="section.visualization"&gt;&lt;/a&gt;Visualization&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;After inventing a good simplification of the reality for the      simulation model, visualization is probably the second most important      feature of the simulation. Simulation data need to be properly      visualized in order to provide the observer with relevant      feedback.&lt;br /&gt;Omitting some important aspect of the simulation by not      visualizing it means threat of misinterpretation of the outputs. On the      other hand, we need a suitable level of aggregation. As an example      consider we would be displaying all states of all agents in every round,      this would produce huge amount of data very difficult to be      analyzed.&lt;br /&gt;Choosing the right properties and the right level of aggregation      is crucial for the simulation success. The simulation application      implemented by the author of this paper uses mostly visual charts — the      line chart and the bar chart — for visualization of aggregated      data.&lt;br /&gt;The visual elements of the commodity market simulation are      described in the following sections.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e580"&gt;&lt;/a&gt;The Utility Gain Chart&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The utility chart displays the increase in the overall utility        of all participating traders after the trade transactions are        processed. The utility increase depends mostly on the random        distribution of harvest each turn. The more inappropriate (in terms of        marginal utility functions of the individual traders) it the harvest        distributed between traders before trading each round the bigger is        the potential utility increase.&lt;br /&gt;This chart is not crucial for understanding the processes in the        market. It is more a debugging tool. For example if this chart shows        negative numbers, it is an obvious sign that there is a significant        problem in the model implementation, as this situation may not occur        under normal conditions. On the other hand it may be used as a means        of how efficient is the market in fulfilling one of it's essential        goals, increasing the utility of participants.&lt;br /&gt;The &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Y&lt;/code&gt; axis shows utility increase due to the        current trading round and &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt; shows time (the trading        round).&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e595"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;4.&amp;nbsp;Total Utility Increase for All Traders&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65E5UK2PI/AAAAAAAADWU/DiCqWQt3uLI/s1600/chart-utility.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65E5UK2PI/AAAAAAAADWU/DiCqWQt3uLI/s320/chart-utility.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e601"&gt;&lt;/a&gt;The Price Chart&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The price chart is the most important chart in the visualization        layer. It shows the development of price in each trading round (see        &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.price" title="Price Evaluation" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Price Evaluation”&lt;/a&gt; for details about how is this price        determined).&lt;br /&gt;Current price on the &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Y&lt;/code&gt; axis is displayed for        each trading round on &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e616"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;5.&amp;nbsp;Price Development in Time&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_65JNRi8xI/AAAAAAAADWc/l02iI2XTJWc/s1600/chart-price.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_65JNRi8xI/AAAAAAAADWc/l02iI2XTJWc/s320/chart-price.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="content-mediaobject"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e622"&gt;&lt;/a&gt;The Harvest Chart&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Harvest directly influences price. The importance of this chart        is to show how is price correlated with the level of current total        harvest. Some trading strategies may significantly influence price        evaluation so that the price development becomes very much independent        on current harvest level.&lt;br /&gt;The quantity on the &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Y&lt;/code&gt; axis show total harvest        assigned to all traders (farmers) and the &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt; axis        means rounds.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e635"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;6.&amp;nbsp;The Total Harvest Chart&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_65NBxfOVI/AAAAAAAADWk/lFNfF6AlFqU/s1600/chart-harvest.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_65NBxfOVI/AAAAAAAADWk/lFNfF6AlFqU/s320/chart-harvest.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e641"&gt;&lt;/a&gt;Demand and Supply Curve&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;For each round the visualization layer draws the demand and        supply curves. Construction of those curves has been discussed in        &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.price" title="Price Evaluation" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Price Evaluation”&lt;/a&gt;. This chart has an overlap which the        price development chart, but it shows only the current round price        without capturing the development. It is more useful to see how        healthy the market is, how is the ability of the supply to meet demand        and also what quantity of transaction has been traded in the market in        each step.&lt;br /&gt;Different trader strategies influence significantly the shape of        the demand and supply curves as discussed further.&lt;br /&gt;The chart shows quantity on the &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt; axis and        price on &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Y&lt;/code&gt;.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e658"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;7.&amp;nbsp;Demand and Supply&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img alt="Demand and Supply" src="media/marketsimulation/chart-ds.png" width="100%" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_65VUsZ9zI/AAAAAAAADWs/_qQzE39SvRk/s1600/chart-ds.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_65VUsZ9zI/AAAAAAAADWs/_qQzE39SvRk/s320/chart-ds.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br class="figure-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e664"&gt;&lt;/a&gt;Commodity Distribution Chart&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;This chart show distribution of the commodity before and after        the trade round takes place. The usual pattern shows a more equal        distribution which is turned into less equally distributed commodity.        The random assignment of harvest is turned into a state where        commodity is concentrated in hands of those traders who have more        utility from each unit.&lt;br /&gt;The chart displays the amount of commodity on the        &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt; axis and the amount of traders who own exactly        this amount of commodity on &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Y&lt;/code&gt;. It is basically a        distribution function. It shows how gets the commodity redistributed        after each trading round and whether there is some long-term        development in the curve shape.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e677"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;8.&amp;nbsp;Commodity Distribution&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_65YhV5ZuI/AAAAAAAADW0/ea5IxXKONmE/s1600/chart-commodity.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_65YhV5ZuI/AAAAAAAADW0/ea5IxXKONmE/s320/chart-commodity.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e683"&gt;&lt;/a&gt;Budget Distribution&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The budget distribution shows where is the budget mostly        concentrated. It is divided per trader type. It shows which trader        strategy is more successful in concentrating budget. The depicted        chart is highly aggregated. It shows the number of traders for each        type who holds only units, tens, hundreds, thousands and more of        currency units.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e689"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;9.&amp;nbsp;Budget Distribution&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img alt="Budget Distribution" src="media/marketsimulation/chart-budget.png" width="100%" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_65ccfe6sI/AAAAAAAADW8/lRE9FrIFinY/s1600/chart-budget.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_65ccfe6sI/AAAAAAAADW8/lRE9FrIFinY/s320/chart-budget.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br class="figure-break" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e695"&gt;&lt;/a&gt;Computerized trading&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Computerized trading is becoming more and more popular. Some of the    markets today are already mostly computer driven and trading resembles a    fight between algorithms. Algorithms may try to predict what effect do    algorithms of others have on the market and thus using this information to    better react on the development to generate bigger profit .&lt;br /&gt;Computerized trading may introduce potential risks into the    commodity market environment. It raises questions as for example:    “&lt;span class="quote"&gt;What happens when most of the traders start to use computerized    algorithms to trade on the market?&lt;/span&gt;” “&lt;span class="quote"&gt;Is the market still    about demand and supply or is it becoming more a virtual environment which    has just little to do with the commodity itself?&lt;/span&gt;”&lt;br /&gt;Another aim of this paper is to study what happens if we introduce    computerized traders into the reference model — an environment where so    far only farmers with different consumer preferences traded.&lt;br /&gt;Constant price fluctuations enable automatic profit generation. One    of the simplest models for automatic trading is the channel breakout    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1737" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;3&lt;/span&gt;&lt;/a&gt;] [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1744" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;4&lt;/span&gt;&lt;/a&gt;] [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1756" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;5&lt;/span&gt;&lt;/a&gt;]. This    trading strategy basically means buying at &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-day    minimum and selling at &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-day maximum.&lt;br /&gt;In fact this model has many modifications and extensions, but the    simplified approach above is easy to implemented into the commodity market    simulation environment.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e728"&gt;&lt;/a&gt;Computer Traders&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;To simulate effects of computerized trading on the commodity      market a &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader &lt;/em&gt;&lt;/span&gt;agent has been introduced      into the simulation environment.&lt;br /&gt;The bidding strategy of the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader      &lt;/em&gt;&lt;/span&gt;is completely different than for the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer      Trader &lt;/em&gt;&lt;/span&gt;explained in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.reference" title="The Reference Model" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “The Reference Model”&lt;/a&gt;.      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Traders&lt;/em&gt;&lt;/span&gt; observe the market and keep track      of the maximum and minimum price for a certain number of rounds. Each      round they generate buy bids for the minimum price and sell bids for the      maximum. Sell bids are constrained by the available commodity units      owned by the particular trader and buy bids are limited by the traders      budget.&lt;br /&gt;To enforce simulation heterogeneity &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer      Traders&lt;/em&gt;&lt;/span&gt; as well as &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Traders&lt;/em&gt;&lt;/span&gt; have      parameters which are set randomly within specified boundaries before      simulation rounds start. One of the parameters is budget&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e757" id="d290e757"&gt;5&lt;/a&gt;]&lt;/sup&gt; and the other is number of rounds traders observe the      market price to establish the minimum and maximum price used for their      bidding.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e765"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;3.&amp;nbsp;Computer trader bids&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;Imagine a &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader&lt;/em&gt;&lt;/span&gt; with budget of          100 currency units and 5 commodity units on stock. He observers the          market price for 10 rounds and the maximum price in that period was          15 and minimum was 10. This particular agent places 5 sell bids for          15 and 10 buy bids for 10.&lt;br /&gt;Bidding heterogeneity is encouraged with the number of rounds          different traders observe the market which may cause different          maximum and minimum prices for each trader. Imagine another trader          who observers the market only for 5 rounds his maximum and minimum          would be somewhere between 10 and 15. This means, &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer          Trader &lt;/em&gt;&lt;/span&gt;supply will never meet another &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer          trader &lt;/em&gt;&lt;/span&gt;demand. They will only be involved in transactions          with &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Traders&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;/div&gt;&lt;br class="example-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="section.reference.setup"&gt;&lt;/a&gt;The Reference Setup&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;First we observe the market behaviour when only the      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Traders&lt;/em&gt;&lt;/span&gt; are involved. &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#table.reference.setup" title="Reference Simulation Setup" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Table&amp;nbsp;7, “Reference Simulation Setup”&lt;/a&gt; shows the parameter setting.&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.reference.setup"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Reference Simulation Setup&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Reference Simulation Setup"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col align="right"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Simulation&lt;/td&gt;&lt;td align="right"&gt;The Reference Setup&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rounds&lt;/td&gt;&lt;td align="right"&gt;1000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Budget&lt;/td&gt;&lt;td align="right"&gt;1000 – 10000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Harvest&lt;/td&gt;&lt;td align="right"&gt;1 – 5, 10 – 40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Consumer Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P1&lt;/td&gt;&lt;td align="right"&gt;1 – 10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P2&lt;/td&gt;&lt;td align="right"&gt;50 – 200&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;In the reference setup we observe significant price culminations,      but it is basically a random walk around a central value, see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.run.reference" title="Figure 10. One Run of the Reference Setup" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;10, “One Run of the Reference Setup”&lt;/a&gt; . This may be easily proven. When      setting a fixed amount of harvest each turn for each trader, price gets      settled on a certain number without any culminations as shown in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.run.no.harvest.culm" title="Figure 11. Price Development with Stable Harvest" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;11, “Price Development with Stable Harvest”&lt;/a&gt; .&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.run.reference"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;10.&amp;nbsp;One Run of the Reference Setup&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65m8XGUvI/AAAAAAAADXE/HkZbnbgTstA/s1600/run-reference.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65m8XGUvI/AAAAAAAADXE/HkZbnbgTstA/s320/run-reference.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img alt="One Run of the Reference Setup" src="media/marketsimulation/run-reference.png" width="100%" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The reference simulation has been run for 20 times to avoid random      fluctuation. In all runs, the price starts at a quite high level (more      than 25) and slowly declines each round. The closing price after 1000      rounds was in the space of 8 to 12 for the 20 runs.&lt;br /&gt;The price decline is caused by the random conditions at the      beginning of the simulation. During each run budged is iteratively      transferred from traders who relatively prefer commodity over money to      traders with reverse preferences. Every round new commodity is harvested      and divided between traders. The demand and supply curve and the amount      traded depends how is the commodity distributed within those two      distinct groups.&lt;br /&gt;This is demonstrated on the budget distribution chart where most      of the traders are within the 10^3 bar (they are having thousands of      currency units) when the simulation starts and as the simulation      proceeds a less equal distribution is formed. Most traders are either      having little budgets or on the contrary huge budgets, see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.run.reference" title="Figure 10. One Run of the Reference Setup" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;10, “One Run of the Reference Setup”&lt;/a&gt; . The middle class slowly      disappears.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.run.no.harvest.culm"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;11.&amp;nbsp;Price Development with Stable Harvest&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65rRQg2bI/AAAAAAAADXM/-r2R3ZBGy7s/s1600/run-reference-stable-harvest.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65rRQg2bI/AAAAAAAADXM/-r2R3ZBGy7s/s320/run-reference-stable-harvest.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e868"&gt;&lt;/a&gt;Adding Computerized Traders&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Now we are ready to simulate Computer Trader agents' influence on      the reference market model described in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.reference.setup" title="The Reference Setup" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “The Reference Setup”&lt;/a&gt;.&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e875"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Computerized Trader Market Setup&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Computerized Trader Market Setup"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col align="right"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Simulation&lt;/td&gt;&lt;td align="right"&gt;Computer Trader Market Setup&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rounds&lt;/td&gt;&lt;td align="right"&gt;1000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Budget&lt;/td&gt;&lt;td align="right"&gt;1000 – 10000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Harvest&lt;/td&gt;&lt;td align="right"&gt;1 – 5, 10 – 40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Consumer Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P1&lt;/td&gt;&lt;td align="right"&gt;1 – 10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P2&lt;/td&gt;&lt;td align="right"&gt;50 – 200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Computer Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Round Observed&lt;/td&gt;&lt;td align="right"&gt;5 – 30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Start Trading&lt;/td&gt;&lt;td align="right"&gt;after round 150&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;In this simulation setup, we add another 30 &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer      Trader&lt;/em&gt;&lt;/span&gt; agents. They keep track of the market price for 5 - 30      rounds to determine the maximum and minimum price of their bids. Traders      start trading after 150 rounds when market gets more stable.&lt;br /&gt;Again the simulation has been run 20 times with this setup to      avoid random fluctuation to see if some patterns of behaviour will proof      to be stable.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.run.computer"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;12.&amp;nbsp;Market Simulation Run with Computer Traders&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65v7gaz3I/AAAAAAAADXU/sZi5Yd7AT1k/s1600/run-computer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_65v7gaz3I/AAAAAAAADXU/sZi5Yd7AT1k/s320/run-computer.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;In &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.run.computer" title="Figure 12. Market Simulation Run with Computer Traders" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;12, “Market Simulation Run with Computer Traders”&lt;/a&gt; you see a snapshot of      one of the runs. It clearly demonstrates the effect of      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader &lt;/em&gt;&lt;/span&gt;presence in the simulation on the      price development which is significant. First the price development      shows the same pattern as in the reference simulation. After round 150      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader&lt;/em&gt;&lt;/span&gt; agents start trading. The price      development gets immediately affected. Its oscillation weakens each      round until it gets nearly stable -/+ 1 currency unit.&lt;br /&gt;Even harvest has the same characteristics as in the reference      simulation, price is no more affected by the current harvest level. The      presence of the new agent strategy in the market did stabilize price and      made it less dependent on harvest development.&lt;br /&gt;The rationale lies in the way &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Traders      &lt;/em&gt;&lt;/span&gt;react on the price development. When price is rising due to a      lower total harvest level and it starts reaching agent's      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-round maximum they react by selling their stock      commodities. This brings more commodity to the market causing price to      fall. Analogically, higher harvest causing the price to fall reaching      agents' minimum price makes agents buy and thus turning the fall into      growth again.&lt;br /&gt;Constraining price fluctuations over time causes the      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-round maximum and minimum to shrink. This makes the      agents buy and sell earlier when price fluctuates and thus shrinking the      price oscillation more and more until is gets bounded on a certain      price.&lt;br /&gt;&lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader&lt;/em&gt;&lt;/span&gt; strategy is definitely a      profitable one in the reference market model. As price fluctuates the      agent budget increases. But less oscillations over time means less      profit for the traders.&lt;br /&gt;The demand and supply curve shape is affected as well. In &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.run.computer" title="Figure 12. Market Simulation Run with Computer Traders" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;12, “Market Simulation Run with Computer Traders”&lt;/a&gt; you see large horizontal segments of      the demand and supply curve. They correspond to the      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-round maximum (supply) and minimum (demand) prices      the agents did establish. This horizontal segments start to emerge after      the 150&lt;sup xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;th&lt;/sup&gt; round. First there is a significant      gap between both curves but it shrinks with each round as the agents'      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-round maximum comes closer to the minimum.&lt;br /&gt;The average price after 1000 rounds measured in 20 runs tend to      end between 10-11 currency units which is basically the same as in the      reference simulation runs. This means, the average price was not      affected by the new type of trader introduced to the market but standard      deviation got significantly lower.&lt;br /&gt;To conclude, computerized traders did not cause any significant      market failures. In fact they did stabilize the market, making price      less dependent on the exogenous harvest factor.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1001"&gt;&lt;/a&gt;Market Failures&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;One of the popular aims of automated market simulations is to    simulate different market failures. For example [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1730" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;2&lt;/span&gt;&lt;/a&gt;]    simulates market price bubbles using near zero-intelligent agents.&lt;br /&gt;Market bubbles do not occur with rational traders. From various    studies [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1723" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;1&lt;/span&gt;&lt;/a&gt;] [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1730" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;2&lt;/span&gt;&lt;/a&gt;] it seams bubbles are    related to some kind of cognitive failures of traders. Zero-intelligent    agents are basically traders who act nearly randomly. It simulates real    life traders with minimum background knowledge who do not act rationally    and their behaviour resembles random decisions.&lt;br /&gt;This paper focuses on another frequently mentioned reason for market    bubbles which is groupthink and herd behavior. Yet another trading    strategy has been introduced into the simulation described in this paper —    the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Trader&lt;/em&gt;&lt;/span&gt;.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1022"&gt;&lt;/a&gt;Trend Trader&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;In contrast to zero-intelligent agents, the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend      Trader&lt;/em&gt;&lt;/span&gt; agent is a representative of a trading strategy which      actually makes sense in some situations. This type of agent expects the      market to follow certain stable trends. In case price is a random walk      this trader is going to loose money over time. But in case there is a      significant trend factor in the price development, this trader may be      involved in profitable transactions.&lt;br /&gt;The &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Trader&lt;/em&gt;&lt;/span&gt; keeps a history of prices      and calculates a trend out of it. According to the trend he predicts the      price in the following round. In case the trend is positive the agent      places buy bids on the market as he expects the trend to continue. In      case trend is negative the agent sells.&lt;br /&gt;This strategy is closely related to groupthink or herd behaviour      as agents simply expect others to behave similarly which will cause the      trend to continue. In case there is a positive price trend the prospects      are positive and everyone is buying, the agent predicts the price to      continue to rise. He is buying, as he expects he can sell for even more      later. As soon as the trend changes, the agent expects the market just      passed a peak and he starts selling while price is still high.&lt;br /&gt;Analogically to &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Traders&lt;/em&gt;&lt;/span&gt;,      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; observe market price for a certain      period (one of the parameters) and each turn they calculate trend out of      the recent price history. Expected price P&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;e&lt;/sub&gt; is      calculated as an the current price &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;P&lt;/code&gt; and the      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-round trend      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;T&lt;sub&gt;n&lt;/sub&gt;&lt;/code&gt;.&lt;br /&gt;&lt;div class="equation"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1060"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Equation&amp;nbsp;1.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class="equation-contents"&gt;&lt;span class="content-mathphrase"&gt;P&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;e&lt;/sub&gt; = T&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/sub&gt; +        P&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Trend &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;T&lt;sub&gt;n&lt;/sub&gt;&lt;/code&gt; is calculated      as average &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ΔP&lt;/code&gt; for rounds &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r&lt;/code&gt; -      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt; .. &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r &lt;/code&gt;- 1, where      &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r&lt;/code&gt; is the current round number&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e1092" id="d290e1092"&gt;6&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;&lt;div class="equation"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1096"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Equation&amp;nbsp;1.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class="equation-contents"&gt;&lt;span class="content-mathphrase"&gt;T&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/sub&gt; = ( ∑&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;i ∈ { r - n + 1        .. r -1 }&lt;/sub&gt; ΔP&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;i&lt;/sub&gt; ) .        &lt;sup xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;1&lt;/sup&gt;/&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n - 1&lt;/sub&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1113"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;4.&amp;nbsp;Trend Trader Bidding&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;Image a &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Trader&lt;/em&gt;&lt;/span&gt; who observers the        price market for &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt; = 6 rounds. He has a budget of        150 currency units and 5 commodity units on stock.&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1124"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Observed Price History&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Observed Price History"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Round &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r&lt;/code&gt;&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;201&lt;/td&gt;&lt;td&gt;202&lt;/td&gt;&lt;td&gt;203&lt;/td&gt;&lt;td&gt;204&lt;/td&gt;&lt;td&gt;205&lt;/td&gt;&lt;td&gt;206&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;P&lt;/code&gt;&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ΔP&lt;/code&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;-6&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Trend&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;44&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ΔTrend&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;T&lt;sub xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/sub&gt; = 20 / 5 = 4, expected price in round        206 is 44 currency units. Trend is positive, the trader expects price        to increase and thus he is buying.&lt;br /&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="media/marketsimulation/price_trend.png" width="100%" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="table.ct.sell.bids"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Trend Trader's Demand&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Trend Trader's Demand"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Quantity&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;44&lt;/td&gt;&lt;td&gt;44&lt;/td&gt;&lt;td&gt;44&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br class="table-break" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_66I87hGAI/AAAAAAAADXc/wAtXZ6Lpsl4/s1600/price_trend.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_66I87hGAI/AAAAAAAADXc/wAtXZ6Lpsl4/s320/price_trend.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br class="example-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1251"&gt;&lt;/a&gt;Consumer and Trend Traders&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;In the next simulation series we place &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Traders      &lt;/em&gt;&lt;/span&gt;together with &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;in the      commodity market.&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1262"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Trend Traders with Consumer Traders Simulation Setup&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Trend Traders with Consumer Traders Simulation Setup"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col align="right"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Simulation&lt;/td&gt;&lt;td align="right"&gt;Trend and Consumer Trader Setup&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rounds&lt;/td&gt;&lt;td align="right"&gt;1000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Budget&lt;/td&gt;&lt;td align="right"&gt;1000 – 10000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Harvest&lt;/td&gt;&lt;td align="right"&gt;1 – 5, 10 – 40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Consumer Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P1&lt;/td&gt;&lt;td align="right"&gt;1 – 10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P2&lt;/td&gt;&lt;td align="right"&gt;50 – 200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Trend Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Round Observed&lt;/td&gt;&lt;td align="right"&gt;5 – 30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Start Trading&lt;/td&gt;&lt;td align="right"&gt;after round 150&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;As discussed earlier, price development in the solely      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Trader&lt;/em&gt;&lt;/span&gt; market is basically a random walk      correlated with harvest which is a random function. There are no trends      for a purely random variable, there is just noise. This causes      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;to mistakenly recognize trends where      there are non.&lt;br /&gt;As a result &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;really cause      short-term bubbles to occur on the market, but they are incrementally      loosing money on them. As their budget decreases, their ability to place      bids lowers until the market starts behaving as if no other agents than      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Traders&lt;/em&gt;&lt;/span&gt; where present on the      market.&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.run.consumer.trend" title="Figure 13. Simulation Run with Consumer and Trend Traders" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;13, “Simulation Run with Consumer and Trend Traders”&lt;/a&gt; demonstrates the      behaviour explained above on a simulation snapshot. Even harvest is a      random walk, price development depicts significant bubbles. The price      starts dramatically rising reaching its peak in circa 20 - 30 rounds.      Than it falls straight down again in less than 10 rounds. The budget      distribution chart already shows &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders      &lt;/em&gt;&lt;/span&gt;starting to loose their budgets. The most frequent category      has only 10s of currency units so they are unable to influence the      market significantly.&lt;br /&gt;As &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; loose money, bubbles tend to      weaken until finally the price returns into a random walk correlated      only with the harvest. The supply curve shape is significantly      influenced by the agent behavior. As trend is currently negative in the      snapshot, most &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;bid to sell for a      similar quite low price.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.run.consumer.trend"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;13.&amp;nbsp;Simulation Run with Consumer and Trend Traders&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_66Mee7LxI/AAAAAAAADXk/WkhXnqc2mH0/s1600/run-consumer-trend.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_66Mee7LxI/AAAAAAAADXk/WkhXnqc2mH0/s320/run-consumer-trend.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;During the upward trend agents start buying and thus reversely the      demand curve shape is affected showing a large horizontal segment as      seen in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.upward.trend" title="Figure 14. Upward Trend" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;14, “Upward Trend”&lt;/a&gt;. In the same figure we      see how is price development turned from a random walk into bubbles as      soon as &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; start to trade (after round      150).&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.upward.trend"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;14.&amp;nbsp;Upward Trend&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_66RG2nZ5I/AAAAAAAADXs/Z3RUn_HiZGk/s1600/run-consumer-trend-upward.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_66RG2nZ5I/AAAAAAAADXs/Z3RUn_HiZGk/s320/run-consumer-trend-upward.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.back.random" title="Figure 15. Back to Random Walk" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;15, “Back to Random Walk”&lt;/a&gt; depicts how is the      “&lt;span class="quote"&gt;bubbled&lt;/span&gt;” price development incrementally turned back to      random noise. The budget distribution chart shows the majority of      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; having just 10s of currency units so      they do not affect price evaluation anymore.&lt;br /&gt;The presence of &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; affects average      price during simulation runs. Even finally average price in 20 runs      turns to be 12 which is similar to the previous setups, it is probably      because of the relatively short period Trend Traders have to affect the      market. During the time &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; are active on      the market, average price gets up to 30 currency units.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.back.random"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;15.&amp;nbsp;Back to Random Walk&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_66UNKx5iI/AAAAAAAADX0/0u-KRPcc2Kw/s1600/run-consumer-trend-random-again.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_66UNKx5iI/AAAAAAAADX0/0u-KRPcc2Kw/s320/run-consumer-trend-random-again.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1401"&gt;&lt;/a&gt;All Trader Types Together&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The highpoint of this paper is the following setup where all      trader types are put together into the same simulation      environment.&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1406"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Simulation Setup with All Agent Types&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Simulation Setup with All Agent Types"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col align="right"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Simulation&lt;/td&gt;&lt;td align="right"&gt;Consumer, Computer and Trend Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rounds&lt;/td&gt;&lt;td align="right"&gt;1000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Budget&lt;/td&gt;&lt;td align="right"&gt;1000 – 10000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Harvest&lt;/td&gt;&lt;td align="right"&gt;1 – 5, 10 – 40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Consumer Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P1&lt;/td&gt;&lt;td align="right"&gt;1 – 10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;P2&lt;/td&gt;&lt;td align="right"&gt;50 – 200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Computer Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Round Observed&lt;/td&gt;&lt;td align="right"&gt;5 – 30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Trend Traders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number&lt;/td&gt;&lt;td align="right"&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Round Observed&lt;/td&gt;&lt;td align="right"&gt;5 – 30&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;With all three trader types involved the simulation becomes      complex and difficult to interpret. Testing experiences have shown with      all trader types together even a very little change in the behaviour of      one trader could be multiplied in combination with some features of      other agent types causing unpredicted results.&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.run.all" title="Figure 16. Simulation Run Snapshot — All Traders" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;16, “Simulation Run Snapshot — All Traders”&lt;/a&gt; depicts one of simulation run      snapshots. The price development shows very interesting patterns. Price      is extremely unstable in a longer run but showing segments of stability      for shorter time periods. It seems as if &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Traders      &lt;/em&gt;&lt;/span&gt;would compete with &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;over      who is causes the major influence on price and some developments are      more favourable to either the first or the second group.&lt;br /&gt;An important discovery conducted from this simulation setup is:      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; actually become profitable if      accompanied with &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Traders&lt;/em&gt;&lt;/span&gt; on the market.      The budget distribution chart shows many &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders      &lt;/em&gt;&lt;/span&gt;still with budget of 1000s currency units even the round did      already pass 450. This is a stable phenomenon observer in many different      runs with this setup.&lt;br /&gt;The cause may likely be explained by the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer      Trader's &lt;/em&gt;&lt;/span&gt;effect on price reducing random walk which is      harmful for &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders.&lt;/em&gt;&lt;/span&gt; Shifts between periods      where price is mostly influence by one or the other trader group may be      explained by budget fluctuations between trader groups.&lt;br /&gt;Imagine &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;rule the market and a      steep price increase has just begun. More and more traders start to      realize a positive trend and they buy causing the price to rise even      more. After a while &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;consume most of      their budget for commodity, less buy bids are issued and price increase      starts to slow down. This continues until the peak is met and      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders&lt;/em&gt;&lt;/span&gt; loose their ability to cause further      increase.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.run.all"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;16.&amp;nbsp;Simulation Run Snapshot — All Traders&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img alt="Simulation Run Snapshot — All Traders" src="media/marketsimulation/run-all.png" width="100%" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_66YKjRwnI/AAAAAAAADX8/iqxy4u8icek/s1600/run-all.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_66YKjRwnI/AAAAAAAADX8/iqxy4u8icek/s320/run-all.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;At this time, price reaches ridiculous proportions with no      relation to harvest which is the only price maker in the reference      model. As a result, price starts to fall down quickly to it reference      model natural average around the value of 10. &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders      &lt;/em&gt;&lt;/span&gt;who first notice the trend&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e1532" id="d290e1532"&gt;7&lt;/a&gt;]&lt;/sup&gt; shift have opportunity to earn as they start selling at      high prices, others will loose because of the bubble. At this point      &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;start to cumulate budget again and      they are accelerating the price fall.&lt;br /&gt;Bubbles are less advantageous for &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Traders      &lt;/em&gt;&lt;/span&gt;who benefit especially in the random walk environment. They      were selling to the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;during the price      increase in the first phase of the bubble. Now when price decreases they      wait until it reaches their &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-round minimum. Those      with higher &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt; are better off as they start buying      later for less. The &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader's &lt;/em&gt;&lt;/span&gt;behaviour is      likely responsible for the stair-like effect during the price fall      phase.&lt;br /&gt;As price falls more and more, traders reach their minimums and      they start buying. They cumulated budget during the rise phase so they      are strong enough to stop the fall for few rounds. This creates the      distinctive horizontal segments in the price curve.&lt;br /&gt;It is important to note that the partial explanations above are      only speculations. There is no evidence that the price development was      really significantly influenced by the mentioned causes. The simulation      already reached the point where it mostly resembles a black box and      deeper understanding of the model would require better diagnostic tools      and much deeper insight.&lt;br /&gt;In 20 runs the average price during this simulation setup was      stable around 18 currency units which is nearly the double of the      average price measured in the reference model.&lt;br /&gt;Different price bubbles are very frequent during this simulation      setup as demonstrated by &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.price.bubbles" title="Figure 17. Captured Price Bubble Gallery" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;17, “Captured Price Bubble Gallery”&lt;/a&gt;. They      basically appear constantly during the whole run. No trader groups tends      to get out of budget during simulations.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.price.bubbles"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;17.&amp;nbsp;Captured Price Bubble Gallery&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e1576" id="d290e1576"&gt;8&lt;/a&gt;]&lt;/sup&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img alt="Captured Price Bubble GalleryNote the Prague Castle-like shape of many of the simulated price bubbles." src="media/marketsimulation/bubble-gallery.png" width="100%" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_66b7_8mLI/AAAAAAAADYE/NusaZk_nhPc/s1600/bubble-gallery.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_66b7_8mLI/AAAAAAAADYE/NusaZk_nhPc/s320/bubble-gallery.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br class="figure-break" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1582"&gt;&lt;/a&gt;Conclusion&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;This paper demonstrates how to build an automated simulation    environment from scratch and how to simulate complex real life patterns    which are very difficult to be studied analytically.&lt;br /&gt;Complexity has been introduced iteratively. First, each trader    strategy has been studied separately causing predictable and clearly    explainable results. After all three very simple trader strategies    described in this paper were put together into the same simulation setup,    very complex patterns emerged.&lt;br /&gt;This demonstrates a synergic effect known from the system theory.    Adding few simple elements into the system influencing each other is    causing complex results which are difficult to predict or analyze.&lt;br /&gt;There are also other consequences of the observed simulation runs.    The commodity market has it's moral dimension as availability of the    commodities traded on the market are essential for people's basic    survival. Different simulation setups allowed as to study the influence of    different trading strategies on the reference model which is composed    solely of traders who are in fact also consumers of the commodity.&lt;br /&gt;This paper has shown that some trading strategies may be neutral or    even beneficial for the consumers, but other may cause unpredictable    developments and price bubbles which are very dangerous especially on the    commodity market for reasons mentioned in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.commodity.market" title="Commodity Market" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Commodity Market”&lt;/a&gt;.&lt;br /&gt;Simulation involving the computerized traders made the market less    vulnerable to seasonal influences&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e1599" id="d290e1599"&gt;9&lt;/a&gt;]&lt;/sup&gt;, which was beneficial to consumers as it gave them a stable    environment with price less dependent on random factors. At the same time,    the long term average price was nearly the same as in the reference    model.&lt;br /&gt;On the other hand, the final simulation setup with all three trader    types involved has shown an hostile environment for the consumers.    &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend Traders &lt;/em&gt;&lt;/span&gt;cause price bubble which increases    price for regular consumers up to 700% during peaks and &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer    Traders&lt;/em&gt;&lt;/span&gt; preserve them so bubbles last longer. Bubbles even    longer than 100 rounds has been observed during different simulation    runs.&lt;br /&gt;The average price during the 1000 simulation rounds has shown to be    double of the average price in the reference model.&lt;/div&gt;&lt;div class="content-appendix" lang="en"&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="appendix.implementation"&gt;&lt;/a&gt;A.&amp;nbsp;Implementation&lt;/h2&gt;The simulation environment described in the previous sections has    been implemented from scratch by the author of this paper. No simulation    framework has been used. The whole system has rather been implemented    specifically in &lt;span class="application"&gt;Java&lt;/span&gt; programming language using    a specific object model, see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#figure.sim.om" title="Figure A.1. The Simulation High-level Object Model" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;A.1, “The Simulation High-level Object Model”&lt;/a&gt;.&lt;br /&gt;&lt;span class="application"&gt;JFreeChart&lt;/span&gt; library for rendering    different chart types has been used for the visualization layer which is    basically a &lt;span class="application"&gt;Swing &lt;/span&gt;application.&lt;br /&gt;The main &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Simulation&lt;/code&gt; class is the place where    to setup different parameters of the simulation run. Each round is    calculated in &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Market&lt;/code&gt; which holds collections of    traders. Buy and sell &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Bids&lt;/code&gt; are collected for each    trader, ordered ascending and descending to form the demand and supply    series. After equilibrium price is determined the market is cleared and    transactions between traders are processed.&lt;br /&gt;Each round during calculation the &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Market&lt;/code&gt;    notifies all registered &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;IMarketListeners&lt;/code&gt; about    development in commodity, budget, price, demand, supply and utility. There    is just one implemented listener which is the    &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Dashboard&lt;/code&gt;. It is a &lt;span class="application"&gt;Swing&lt;/span&gt;    &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;JFrame&lt;/code&gt; and it contains all the charts described in    &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#section.visualization" title="Visualization" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Visualization”&lt;/a&gt;. Some charts are updated before    the round starts&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e1661" id="d290e1661"&gt;10&lt;/a&gt;]&lt;/sup&gt; and all are updated after the round finishes.&lt;br /&gt;Any trader who implements the &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ITrader&lt;/code&gt;    interface may be easily plugged to participate in the simulation. If the    trader extends the &lt;code class="content-classname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;AbstractTrader&lt;/code&gt; class, it only    needs to implement the following methods:    &lt;code class="content-methodname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;getBuyBids()&lt;/code&gt;,    &lt;code class="content-methodname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;getSellBids()&lt;/code&gt;,    &lt;code class="content-methodname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;priceUpdate()&lt;/code&gt;,    &lt;code class="content-methodname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;consumeCommodity()&lt;/code&gt;. The different trading    strategies (&lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Trader&lt;/em&gt;&lt;/span&gt;, &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Trend    Trader&lt;/em&gt;&lt;/span&gt; and &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Computer Trader&lt;/em&gt;&lt;/span&gt;) differ only in    the implementation of those 4 methods.&lt;br /&gt;The abstract class executes all the functionality the agents have in    common, for example updating the commodity variable in can agents did buy    some or updating the budget in case transactions are made etc...&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="figure.sim.om"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;A.1.&amp;nbsp;The Simulation High-level Object Model&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" summary="manufactured viewport for HTML img"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_66fTSK5qI/AAAAAAAADYM/usFeQlszg1o/s1600/class-diagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_rwM3HrdhDr8/S_66fTSK5qI/AAAAAAAADYM/usFeQlszg1o/s320/class-diagram.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img alt="The Simulation High-level Object Model" src="media/marketsimulation/class-diagram.png" width="100%" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;To demonstrate how easy it is to bring a new trader into the    simulation, lets assume we intend to introduce a &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Random Trader    &lt;/em&gt;&lt;/span&gt;who acts randomly ignoring price signals from the market. &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#example.random.trader" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;A.1, “Random Trader      Implementation”&lt;/a&gt; shows the implementation code&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#ftn.d290e1710" id="d290e1710"&gt;11&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1717"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;A.1.&amp;nbsp;Random Trader      Implementation&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;public class RandomTrader extends AbstractTrader {&lt;br /&gt;&lt;br /&gt;    public RandomTrader(long budget, long commodity) {&lt;br /&gt;        this.budget = budget;&lt;br /&gt;        this.commodity = commodity;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Collection&amp;lt;IBid&amp;gt; getBuyingBids() {&lt;br /&gt;        Collection&amp;lt;IBid&amp;gt; bids = new ArrayList&amp;lt;IBid&amp;gt;();&lt;br /&gt;        long totalPriceBid = 0;&lt;br /&gt;        while (totalPriceBid &amp;lt; budget) {&lt;br /&gt;            long bidPrice = getRandomPrice();&lt;br /&gt;            totalPriceBid = totalPriceBid + bidPrice;&lt;br /&gt;            bids.add(new Bid(this, bidPrice));&lt;br /&gt;        }&lt;br /&gt;        return bids;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Collection&amp;lt;IBid&amp;gt; getSellingBids() {&lt;br /&gt;        Collection&amp;lt;IBid&amp;gt; bids = new ArrayList&amp;lt;IBid&amp;gt;();&lt;br /&gt;        for (int i = 0; i &amp;lt; commodity; i++) {&lt;br /&gt;            bids.add(new Bid(this, getRandomPrice()));&lt;br /&gt;        }&lt;br /&gt;        return bids;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public void priceInfo(long price) {&lt;br /&gt;        // ignore&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void consumeAll() {&lt;br /&gt;        //ignore&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br class="example-break" /&gt;&lt;/div&gt;&lt;div class="content-bibliography"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="biblio"&gt;&lt;/a&gt;Bibliography&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1723"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;1&lt;/abbr&gt;]  Gil-bazo, J., Moreno, D., Tapia,    M.:&lt;span class="content-title"&gt;Price dynamics, informational efficiency, and wealth    distribution in continuous double-auction markets&lt;/span&gt;. Universidad    Carlos III. Spain. 2007.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1730"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;2&lt;/abbr&gt;]  Duffy, J., Unver, U.:&lt;span class="content-title"&gt;Asset price    bubbles and crashes with near-zero-intelligence traders&lt;/span&gt;. Economic    Theory Journal. Berlin. 2005. ISSN 0938-2259&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1737"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;3&lt;/abbr&gt;]  Brooks, A.:&lt;span class="content-title"&gt;Trading    techniques&lt;/span&gt;. Futures. Chicago. 2009.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1744"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;4&lt;/abbr&gt;]  Mayers, D.:&lt;span class="content-title"&gt;Applying The Noise    Channel System to IBM 5min Bars&lt;/span&gt;. Futures. Chicago. 2001.    &lt;span class="content-bibliomisc"&gt;URL: http://www.meyersanalytics.com/papers.php&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1756"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;5&lt;/abbr&gt;]  Katz, J., McCormick,    D.:&lt;span class="content-title"&gt;Encyclopedia of &lt;/span&gt;Trading Strategies. McGraw-Hill. 2000.    ISBN: 00-70580-99-5&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1763"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;6&lt;/abbr&gt;]  Mach, M.:Macroekonomie pro Inženýrské    studium. Melandrium. 1998. ISBN: 80-86175-03-0,    80-86175-04-9&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466" id="d290e1767"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;7&lt;/abbr&gt;]  Soukupová, J., Hořejší., B., Macáková.,    L., Soukup, J.:Microekonomie. Management Press. 2005. ISBN: 80-7261-061-9,    80-86175-04-9&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="footnotes"&gt;&lt;br /&gt;&lt;hr align="left" width="100" /&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e68" id="ftn.d290e68"&gt;1&lt;/a&gt;] &lt;/sup&gt;Raw agricultural commodities traded on the commodity markets        include corn, oats, rough rice, soybeans, soybean meal, soybean oil.        wheat, cocoa, coffee, cotton, sugar.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e129" id="ftn.d290e129"&gt;2&lt;/a&gt;] &lt;/sup&gt;The average value is ( min + max / 2 ) multiplied by the                number of farmers involved.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e209" id="ftn.d290e209"&gt;3&lt;/a&gt;] &lt;/sup&gt;Obviously each unit is bid for a different sell price. With a          diminishing marginal utility function, the last unit is the cheapest          and every previous unit is offered for more. Similarly when buying          units, one unit would be bought for less than the next unit.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e213" id="ftn.d290e213"&gt;4&lt;/a&gt;] &lt;/sup&gt;Another obvious limit for bids: price needs to stay          positive.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e757" id="ftn.d290e757"&gt;5&lt;/a&gt;] &lt;/sup&gt;This is the very same budget parameter used to setup initial          budgets for &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Consumer Traders&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1092" id="ftn.d290e1092"&gt;6&lt;/a&gt;] &lt;/sup&gt;Of course more sophisticated statistical methods may be used          as for example regression or interpolation but this simple method          does its job just fine for the simulation objectives.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1532" id="ftn.d290e1532"&gt;7&lt;/a&gt;] &lt;/sup&gt;Depends on the &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt; in their          &lt;code class="content-varname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;-round price observing parameter.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1576" id="ftn.d290e1576"&gt;8&lt;/a&gt;] &lt;/sup&gt;Note the Prague Castle-like shape of many of the simulated            price bubbles.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1599" id="ftn.d290e1599"&gt;9&lt;/a&gt;] &lt;/sup&gt;They did smoothen the harvest fluctuation and their effect on        price.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1661" id="ftn.d290e1661"&gt;10&lt;/a&gt;] &lt;/sup&gt;For example the commodity distribution chart shows distribution        before trading starts (after harvest) and how did the distribution        change because of trading.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1322746915668636466#d290e1710" id="ftn.d290e1710"&gt;11&lt;/a&gt;] &lt;/sup&gt;To simplify the code, the        &lt;code class="content-methodname" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;getRandomPrice()&lt;/code&gt; method has not been        implemented in the example.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-1322746915668636466?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/1322746915668636466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/artificial-market-simulations-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/1322746915668636466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/1322746915668636466'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/artificial-market-simulations-using.html' title='Artificial Market Simulations using Multi-agent Systems'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_rwM3HrdhDr8/S_64yRvcgVI/AAAAAAAADV8/FPKLZCv1Otw/s72-c/customer.trader.mu.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-9052211308399947677</id><published>2010-05-27T11:18:00.001-07:00</published><updated>2010-05-27T11:34:10.953-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Business IT'/><title type='text'>Critical analysis of MMDIS concepts</title><content type='html'>&lt;div class="content-article" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="subtitle"&gt;&lt;i&gt;Comparing Agile with MMDIS Approaches to Information System    Development&lt;/i&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-author"&gt;&lt;h3 class="content-author"&gt;&lt;span class="firstname"&gt;Petr&lt;/span&gt; &lt;span class="surname"&gt;Nálevka&lt;/span&gt;&lt;/h3&gt;&lt;div class="content-affiliation"&gt;&lt;span class="content-orgname"&gt;University of Economics, Prague&lt;/span&gt; &lt;span class="content-orgdiv"&gt;Department of Information and Knowledge Engineering ­̶        Knowledge Engineering Group&lt;/span&gt;&lt;br /&gt;&lt;div class="content-address"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="street"&gt;W.&amp;nbsp;Churchill&amp;nbsp;Sq.&amp;nbsp;4&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="city"&gt;130&amp;nbsp;67&amp;nbsp;Praha&amp;nbsp;3&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="country"&gt;Czech&amp;nbsp;Republic&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code class="content-email" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;a href="mailto:petr@nalevka.com"&gt;petr@nalevka.com&lt;/a&gt;&lt;/code&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-abstract"&gt;&lt;div class="title"&gt;&lt;b&gt;Abstract&lt;/b&gt;&lt;/div&gt;This paper analyses the Multidimensional Management and      Development of Information Systems (MMDIS) methodology contribution to      information system development in the context of other commonly used      methodologies, especially methodologies which are commonly referred to      as Agile.&lt;br /&gt;The aim is to find out what are their similarities and where do      those approaches differ especially with respect to software development.      The author's aim is further to highlight possible risks and weak points      of the MMDIS methodology based on study of articles by prestigious      international software engineering authorities and based on authors own      over 10 years experiences with real life software projects.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;div class="toc"&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.intro"&gt;Introduction&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e113"&gt;Agile Methodologies&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.dimensions"&gt;MMDIS&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e198"&gt;Dimensions&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.user.perspective"&gt;The User Perspective&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e406"&gt;Implementation dimensions&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.principles"&gt;Main principles&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1104"&gt;From development to management&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1130"&gt;Conclusion&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="bibliography"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#biblio"&gt;Bibliography&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.intro"&gt;&lt;/a&gt;Introduction&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;From the very beginning of Information Technologies as a field,    people are facing ongoing failures of the developed software to satisfy    original requirements. Projects are getting late, over budget and meet    only a small portion of the requirements or in the worse case they are not    suitable for the tasks intended at all.&lt;br /&gt;As a result, experts started to impose all sort of very detailed    step-by-step development processes to better manage risks of the software    projects. Those processes are commonly known as    &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;methodologies&lt;/em&gt;&lt;/span&gt;.&lt;br /&gt;First methodologies in 70s and 80s were inspired by processes taking    place in other industries. The production line [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;], a    highly effective and manageable manufacturing model, has become    inspiration for IT.&lt;br /&gt;Methodologies derived from the production line model break software    development into a series of stages where each stage is dependent on the    output of the previous one. A typical example is the Waterfall technique    first published in 1970 [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1259" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;WF&lt;/span&gt;&lt;/a&gt;]&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e74" id="d291e74"&gt;1&lt;/a&gt;]&lt;/sup&gt;. The aim is to lower risk by putting every single stage of    the project under tight control and define and plan the whole progress in    advanced. That's why such methodologies are commonly referred to as    plan-driven&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e78" id="d291e78"&gt;2&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;Unfortunately, soon, plan-driven approach to software development    has shown it's drawbacks when applied in IT. Software projects are in    their very nature unpredictable. No fixed plan may be created for them in    the first place.&lt;br /&gt;Plan-driven methodologies assume requirements for a particular    project may be set in stone in advance, but this has shown as not being    satisfied in IT. Developed software could not adapt to the ever-changing    business reality and in many cases became outdated already at the release    date. Moreover, applying a pre-planned process in a field where creativity    and ideas are so important made developers become frustrated and less    productive.&lt;br /&gt;Object oriented methodologies brought a breath of fresh air into the    field in the 90s. They allow better mapping between real world entities    and modelled entities in the information system. They do better reflect    the fact that the business domain is changing very quickly and the    developed software needs constantly adapt to the reality.&lt;br /&gt;OO methodologies were mainly based around UML modelling techniques.    See [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1322" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;OOM&lt;/span&gt;&lt;/a&gt;] for a comprehensive analysis of different OO    methodologies.&lt;br /&gt;The object oriented approach allows (if well designed) to    encapsulate peaces of functionality in separate components, so that    changes in one component do not necessarily impose changes in other    components&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e95" id="d291e95"&gt;3&lt;/a&gt;]&lt;/sup&gt;. Also objects allow to define extensibility points for    easier change management.&lt;br /&gt;Even the object oriented approach brought more flexibility into the    field and maybe even saved the industry from a massive failure,    experiences has shown, that it still does not save software projects from    missed deadlines and requirements.&lt;br /&gt;It seems as if the problem with object oriented methodologies is    they tent to be too focused on the design itself&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e104" id="d291e104"&gt;4&lt;/a&gt;]&lt;/sup&gt;. The main thread is, creating a perfect design may become    more important for developers and architects than delivering actual value    for the customer.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e113"&gt;&lt;/a&gt;Agile Methodologies&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Recent methodologies are heading to overcome some of the above    mentioned issues. Such methodologies are commonly called agile&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e118" id="d291e118"&gt;5&lt;/a&gt;]&lt;/sup&gt; to express that they are intended to respond quickly to the    ever changing needs and that they are in the very nature designed for    flexibility.&lt;br /&gt;Doing agile development means thinking agile. It requires a complete    shift in the way we think about software development. Rather than    searching for analogies in other industries, agile methodologies propose    to approach software development uniquely as it is really a unique human    activity [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;]. They learn their lessons directly from    real world successful or failing IT projects.&lt;br /&gt;Although agile methodologies are the latest evolution in how we    approach software development, they don't automatically mean better    results, see [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1336" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;APM&lt;/span&gt;&lt;/a&gt;]. Even they had addressed many    limitations of their predecessors (the plan-driven methodologies) they do    not guarantee success. They do shift a lot of responsibility from rigid    rules to the actual people involved in the project. This inevitably means    the project outcome highly depends on the quality of the people    involved.&lt;br /&gt;No methodology can ever replace highly qualified experts. It can    only help the experts not to be burdened too much with unnecessary    bureaucracy, rigid processes and purely political decisions    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;To quickly summarize the main message of the agile methodologies, we    can use the four values of the agile manifesto    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1217" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AM&lt;/span&gt;&lt;/a&gt;]&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e147" id="d291e147"&gt;6&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;&lt;div class="content-orderedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;Agile Manifesto&lt;/b&gt;&lt;/div&gt;&lt;ol type="1"&gt;&lt;li&gt;         Individuals and interactions over processes and tools       &lt;/li&gt;&lt;li&gt;         Working software over comprehensive documentation       &lt;/li&gt;&lt;li&gt;         Customer collaboration over contract negotiation       &lt;/li&gt;&lt;li&gt;         Responding to change over following a plan       &lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.dimensions"&gt;&lt;/a&gt;MMDIS&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The MMDIS methodology which is maintained at the University of    Economics has been introduced in 1992 [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]. It    differs from the production line methodologies as it does not insist on a    strict order of detailed steps. It rather is a proposed way of thinking    about the software project. It defines each steps of the project life    cycle in several dimensions but rather that explicitly describing what    needs to be done in each step, it proposes several topics to think about    at each step&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e172" id="d291e172"&gt;7&lt;/a&gt;]&lt;/sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;Since 1992 MMDIS evolved from a methodology which primary focus is    on software development to a methodology which tries to cover overall    IS/ICT performance management [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;]. Although its    scope is much larger, in this paper the author will focus primarily on    aspects related to software development and especially on the traditional    custom software development model ignoring some of the latest currents in    the field as for example outsourcing, SaaS or parametrized generic purpose    software bundles. For more information on those topics, please see    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;Even new software distribution method appeared and become popular    recently, software development and its quality is still very important.    Whatever distribution approach is used to deliver software to its users    whether it is SaaS or any other approach the delivered software had to be    developed using some software development methodology. Eligibility of the    selected methodology is crucial for the software quality and influences    essential parameters as for example flexibility which determines how easy    it is to accommodate the developed software to the ever changing business    reality.&lt;br /&gt;Even different distribution methods do not lower the importance of    software &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;development&lt;/em&gt;&lt;/span&gt; methodologies, they do shift    their target audience. In the era when custom software development was    predominant on the market, development methodologies where important also    for the larger enterprises who did frequent self-made software    customizations in their IT departments [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;New trends as for example outsourcing made companies focus more on    their core businesses and thus software development methodologies are more    targeted on those companies whose core business is related to software    development.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e198"&gt;&lt;/a&gt;Dimensions&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The main principle of MMDIS as a software development methodology      is multidimensionality. Multidimensionality means seeing the IT project      from all views relevant to it's efficiency. MMDIS distinguishes two main      groups of dimensions.&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;First group of dimensions&lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;level of abstraction&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;the time dimension&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;level of IS/IT integration&lt;br /&gt;&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;Integration of&lt;/b&gt;&lt;/div&gt;&lt;ul type="circle"&gt;&lt;li&gt;&lt;br /&gt;visions&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;outside environment&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;business processes&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;technology&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="content-itemizedlist"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="dimensions2"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Second group of dimensions&lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;information and data (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;inf&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;processes and functions (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;pro&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;economic and financial (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;eco&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;organizational and legislative (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;org&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;labour, social and ethical (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;lab&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;software (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;sw&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;hardware (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;hw&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;methodical (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;met&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;document (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;doc&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;management (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;mng&lt;/code&gt;)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;The second level of dimension demonstrates one of the interesting      characteristics of MMDIS. Technology (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;sw&lt;/code&gt;,      &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;hw&lt;/code&gt;) is just one of many other dimensions. MMDIS scope      is much larger than only technology, it focuses on all aspects of the      entire company to integrate them well with the technology.&lt;br /&gt;This is in contrast to some agile methodologies which focus mainly      on the technology and how to encourage IT people to be more      productive&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e303" id="d291e303"&gt;8&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;Also when compared to other methodologies MMDIS sees the software      projects from the perspective of the company which actually needs the      software — from the customer perspective, rather than from the      perspective of an IT consultancy or a software house which is doing the      implementation. The second is probably a more common point of view in      software methodologies as it corresponds to a common model in the      software market where software development is being outsourced      [&lt;span class="citation"&gt;VOR3&lt;/span&gt;].&lt;br /&gt;The multidimensional approach shows the IT project is it's whole      complexity. There are several very different dimensions which all      influence the success of a IS/IT project and they even influence each      other.&lt;br /&gt;Note that dimensions are not a rigid enumeration.      [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;] views multidimensionality rather as a      generic problem solving principle where each dimension is solved first      separately and later the separate solutions are integrated into the      overall solution.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.user.perspective"&gt;&lt;/a&gt;The User Perspective&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;MMDIS emphasises the difference between the user and the      implementation perspective. During the implementation process the user      perspective gets transformed into the implementation perspective. This      transformation helps not only to implement user requirements but it also      allows to validate the requirements in terms of feasibility and      consistency between all the implementation dimensions.&lt;br /&gt;In terms of software development methodologies, gathering      requirements and transforming them into a software project is the      crucial and one of the most tricky tasks. To meet the prime objective of      the agile methodologies — to satisfy the customer, it is important to      understand his needs. This is difficult as in most cases even the      customer/user does not know what he needs or he is unable to express it      in words understandable to someone who is not heavily involved in the      customer's domain.&lt;br /&gt;It seems the process of transforming the user requirements to      implementation perspective is in many cases accountable for project      failures . Agile methodologies do not give detailed guidance in this      case. They rather leave it to interpersonal communication. They emphasis      the importance of the adaptive customer [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;] on side      and constant feedback on iteratively added features.&lt;br /&gt;MMDIS on the other hand bets on a precise project plan which is      validated against the high-level strategic goals of the company, the      overall IT concept, which has to be consistent across all the dimensions      and in all stages of the project life-cycle and which is shaped by the      company management, partners, customers as well as by individual      users&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e336" id="d291e336"&gt;9&lt;/a&gt;]&lt;/sup&gt;. Before implementation takes place, the whole complex      space of requirements is transformed into the feasibility study document      and into detailed conceptual design.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e340"&gt;&lt;/a&gt;Management&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;One of the most important user perspectives in MMDIS is the        management perspective. MMDIS is explicit about the role of management        in terms of constraining time and financial budget and defining the        target business processes which shall be supported by ICT. As nobody        else is eligible to do this kind of decisions, management user        perspective has the highest priority and it is very important to        clearly understand aims of the management.&lt;br /&gt;An important aspect is involvement of management in the whole        implementation process. Without management involvement the project        would soon end lacking decisive power.&lt;br /&gt;Agile methodologies especially highlight the fact that gathering        the requirements from the management user perspective is not a one        time activity. This is something which needs to be evaluated        constantly and management needs to be constantly confronted with the        current progress of the system&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e349" id="d291e349"&gt;10&lt;/a&gt;]&lt;/sup&gt; . If management is not able to make the needed decisions        on-time, delegation of power is highly required. It is especially        important to have an eligible customer representative on side with a        sufficient level of decisive power [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1308" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XP&lt;/span&gt;&lt;/a&gt;]        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1315" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;SCRM&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;One of the models for transforming customer requirements is the        quite common fixed price contract where requirements are specified in        the beginning of the project and price bids are accepted        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;]. This model seems very much vulnerable to        failure but it is also the model which seems as a natural choice for        MMDIS, as it emphasises the role of the feasibility study and gives        the management the obligation to set not only requirements, but also        to allocate resources and financing.&lt;br /&gt;This model may be sufficient for the production line industries,        but not for software development which (as we already stated) has a        highly unpredictable process&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e366" id="d291e366"&gt;11&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;In today turbulent markets it is very likely that the        requirements change significantly before the end of the project. Also        some requirements become obvious not sooner than during the project        implementation. That's why the agile approach rather recommends an        iterative approach where in each short-time stages management may        evaluate the progress and change direction of further development        (including changes in time and resources allocation). This is in        contrast to fixed price contract and it requires both an adaptive        customer [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;] as well as an adaptive IT        supplier.&lt;br /&gt;Although requirements are high, there is a chance that the        project will end in a satisfactory manner for both parties, in        contrast to the fixed price contract where both parties usually end as        losers [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;The MMDIS methodology emphasises how important it is to        understand the management aims, but it is not very verbose on how to        do that. Also it does not stress what agile methodologies are        stressing very intensively, that understanding the aims in an on going        process which involves constant reevaluation during the whole project        progress.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e382"&gt;&lt;/a&gt;The end-user&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;In MMDIS the end-user is a source of valuable very detailed (in        comparison to the management user perspective) information. As they        expect the IS to support their every day activities, the        implementation experts are encouraged to gather all sort of important        knowledge from the end-users.&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;End-user knowledge [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]&lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;processes on the particular user level&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;who is responsible for a particular stage in the process or            for the process as a whole&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;what activities are candidates to automation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;what data needs to be collected and persisted&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;The agile methodologies add one more role (but a crucial one) to        the end-user. The end user is a valuable source of evaluation whether        the current prototype is of any customer value to the particular        users. The end-user is seen as a first class tester of the system and        implemented features are consulted on a regular bases with the        involved users.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e406"&gt;&lt;/a&gt;Implementation dimensions&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.dimensions" title="MMDIS" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “MMDIS”&lt;/a&gt; describes two different      groups of MMDIS dimensions which are relevant from the implementation      point of view. The first group of dimensions defines characteristic      phases of implementation.&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;By separating implementation into phases MMDIS aims to        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]&lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;separate work into projects for better planning and          management&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;allow some form of incremental development or          prototyping&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;divide tasks based on the level of abstraction to be solved by          different experts&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;ensure compliance with the high level strategic aims of the          enterprise&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="content-itemizedlist"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="itemizedlist.lifecyclephases"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;The main phases [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e434" id="d291e434"&gt;12&lt;/a&gt;]&lt;/sup&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;Feasibility study&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Global analysis&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Detailed analysis&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Implementation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Installation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Production and maintenance&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e455"&gt;&lt;/a&gt;Incremental development&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The most important statement from the agile point of view is the        MMDIS's emphasise on prototyping and incremental development. But in        the same time MMDIS introduces very detailed and sequential phasing of        the project's life-cycle. Phases may be misleading as people may        immediately thing about phases as sequentially executed steps where        the next step may be executed only after satisfying all the        prerequisites of the previous step.&lt;br /&gt;Because another significant source of IT project failures is        misinterpretation of methodologies [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;], it is        important that methodologies state clearly their intentions to forgo        such misinterpretations. This is a double-edged issue, as making the        methodologies too explanatory makes them on the other hand too rigid        and less applicable on different projects.&lt;br /&gt;Because of the danger of misinterpreting phases as being        something fixed, agile approaches usually tent to either recognize        only the very high level phases or explicitly and clearly explain that        phases are in their very nature highly parallel, iterative with huge        overlaps and executed in a very short time periods (rather days or        weeks rather than months and years).&lt;br /&gt;From this perspective MMDIS reminds some of the plan-driven        methodologies which define a rigid waterfall-like process but as of        the influence of agile they try to extend the same rigid process with        agile elements like prototyping and iterations just to keep their        methodology trendy.&lt;br /&gt;The problem with this approach is, the iterative and parallel        nature of the development processes has to be embedded into the very        essence of the methodology. The whole methodology should be build up        around this idea&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e471" id="d291e471"&gt;13&lt;/a&gt;]&lt;/sup&gt;, otherwise there is a risk the individual phases will be        executed in a long run sequential manner and thus making the project        miss the requirements which will change or become more clear in the        mean time.&lt;br /&gt;Modern methodology needs to have mechanism which will constantly        challenge the achieved, constantly reassure the requirements and        constantly deliver software increments in the shortest possible        integrations.&lt;br /&gt;In &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.intro" title="Introduction" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Introduction”&lt;/a&gt; we described three types of        methodologies, the plan-driven (manufacturing, production line),        object oriented (oriented on design) and agile (customer-oriented). In        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] different methodology types are mapped to        people's three fundamentally different ways of thinking about software        development. Having well described sequential stages is very appealing        especially to people of the manufacturing group as it creates an        illusion of software development as an predictable process which it is        not at all.&lt;br /&gt;In [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;] Martin Fowler says: “&lt;span class="quote"&gt;This leads        to people using a methodology in the wrong circumstances, such as        using a predictable methodology in a unpredictable situation.&lt;/span&gt;”        This is exactly what happened with the plan-driven methodologies of        70's and 80's. Allowing people to process the methodology in a rigid        way (and not shielding them from this seductive option) will        inevitably increase the project risks as predictability in software        development is only an illusion.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e492"&gt;&lt;/a&gt;Implementation roles&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Even more dangerous is to explicitly bind the project stages        with a certain group of experts as suggested in MMDIS.        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;] suggests to “&lt;span class="quote"&gt;Clearly divide        individual levels of abstraction when implementing an IS/IT        solution... and thus determine position for individual experts during        implementation...&lt;/span&gt;”.&lt;br /&gt;This is very dangerous as it may be understood as dividing        people strictly into managers, architects, analysts, developers and        testers. In the worst scenario, those groups are disjunct and        hierarchical.&lt;br /&gt;This idea is again very appealing especially to people with the        manufacturing and partially also design mentality. The manufacturing        mentality would like to see involved people as replaceable units (see        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;] and [&lt;span class="citation"&gt;AC&lt;/span&gt;]) as only with such        people the project plan is predictable. In their eyes projects        dependent on individuals are highly vulnerable to risk.&lt;br /&gt;This is in a direct contrast with what agile methodologies        claim. One of the four main statements in the agile manifesto        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1217" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AM&lt;/span&gt;&lt;/a&gt;] promotes “&lt;span class="quote"&gt;Individuals and interactions        over processes and tools&lt;/span&gt;”. In general many of the agile        methodologies are strictly people-centric. The idea is, if managers        treat people as replaceable units, they also end up with replaceable        units [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;] and this will inevitably influence the        quality of the results.&lt;br /&gt;Replaceable units are of very little use in a field such as        software development which is highly creative and dependent on the        intellectual capacity of involved people. Such approach would lower        morale and commitment of people. This approach resembles Taylor's        scientific management and it may be useful in a factory at the        production line, but it can hardly bring any good for software        development.&lt;br /&gt;Even substitutability of people may help managers to feel safer,        it also inevitably lowers productivity to a fraction. A company        practicing such approach may hardly survive in an highly competitive        market segment as IT.&lt;br /&gt;Rather then anything replaceable, software developers should be        treated more as artist or scientists [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;]. They        usually are highly knowledgeable professionals with a high level of        self discipline. The role of the managers is not to control those        people but to help them get the required competences and to overcome        political and organisational barriers which hider them from being able        to execute.&lt;br /&gt;In contrast to creating replaceable workers, Agile methodologies        propose to hire the best professionals and give them competences and        the power so that they can use all their potential.&lt;br /&gt;Making time and resource planning by the managers, conceptual        design by the architects, detailed analysis by the analysts, code        writing by the developers and testing by testers is the shortest way        to a very inefficient process.&lt;br /&gt;Managers will never have the necessary technical information to        do any time estimates. Architects can hardly create a perfect design        without feedback about the underlaying implementation details.        Analysts will never realize all the low level implementation        difficulties without touching the code physically. Developers will be        frustrated with the design which forces them to create ridiculous        code, to implement structures which looks nice in the high level        concept but do not have any meaning and only complicate things on the        implementation level. Testers will create tests which pass and which        are easy to maintain rather than test capable of finding errors. They        will never test all the functionality intended by the developer        because it is not their code they test, they don't see all the nuances        and all the intentions behind.&lt;br /&gt;The morale of the above example is — ideally project management,        design, analysis, development and also testing shall be done by the        same people. This is of course highly resource demanding and it can        hardly be imposed in the real world. But at least the aim is to make        larger overlaps within those categories so that designers are also        involved in project management and they also do at least some        programming and they are familiar with the most important peaces of        code. Developers are heavily involved not only in analysis but also in        design and they write tests for their own core.&lt;br /&gt;This approach also leads to use of rather smaller teams as IT        professionals are a highly non-scalable resource        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;Some may argue that overlaps and small teams may hardly be        achievable for large projects where too many people are involved and        the overall picture of the project can hardly be kelp in minds of all        of them. On the other hand we need to clarify what is actually a large        project and how we recognize one. Definitely we can't use a circular        definition and claim that large projects are those where a lot of        people are involved. The author of this article has witnessed and        participated in few “&lt;span class="quote"&gt;large projects&lt;/span&gt;”&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e554" id="d291e554"&gt;14&lt;/a&gt;]&lt;/sup&gt; which had been implemented in very small teams composed        of highly knowledgeable self-disciplined professionals. There is an        immense efficiency gain in this model when compared to producing the        same result with replaceable over-specialized workers. Achieving same        result with them would be either highly inefficient or even        impossible.&lt;br /&gt;In same cases software projects really need involvement of more        people to get them done in a reasonable schedule. Then it is really an        issue how we approach scaling of resources. Rather than structuring        people vertically into subordinate roles it may be more efficient to        divide big projects into small partially independent sub-projects        driven by small highly capable teams with responsibility overlaps and        execute them in parallel. Consistency of the overall project is than        maintained by intensive communication of the teams responsible for the        components who have mutual dependencies.&lt;br /&gt;With small agile teams managers may feel not having control over        the project risk management. That's probably one of the reasons why        they seek predictability through a rigid process and replaceable human        resources even they have to pay for it with immense productivity drop.        &lt;br /&gt;There may be a more efficient way of controlling risk using        agile teams. For mission critical projects two or even more        competitive teams may be established to achieve the same goal. Results        of all teams are evaluated and finally the better result is used in        production. This approach makes people highly motivated and it may        also serve as a way of evaluating teams productivity. &lt;br /&gt;Still there are many companies on the market capable to survive        with the inefficient replaceable unit model. It is difficult to find        reasons for that but let's just mention few possible causes:&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;The lack of knowledgeable self-disciplined            professionals.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;The distortion on the market which is very strong in case of            IT. The customer is not capable to accurately evaluate the quality            of purchased software especially in short term.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;The replaceable unit model may be slightly more predictable            which could be crucial for some business models. Also it may be            appealing to customer with the manufacturing mentality.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;At this spot it is worth mentioning offshoring as a popular        method to lover costs of software development. From what has been        stated above it is questionable if offshoring may bring the same        benefits it brings for other fields also in IT. Again we observe the        IT field is really unique and very different from other models. What        works well in manufacturing may fail terribly in IT. Even cost of        human resources in some countries may be a fraction of the costs in        the developed world, the success of offshoring very much depends on        the human capital you are getting for that cost; on their knowledge,        creativity and attitude to work.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.abstraction"&gt;&lt;/a&gt;Levels of abstraction&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The MMDIS methodology further proposes to clearly divide        individual levels of abstractions of the IS/IT to make it better        understandable [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]. This may sound nice, but        it also may be quite risky. We need to keep in mind that the more        abstract constructs we define the more blurred picture of reality we        get.&lt;br /&gt;Over the last decades Business informatics has establish a whole        new language which helps non-technical people in IT to communicate        with non-technical people in other areas in order to sell IT services        and software licenses to them. This language composes of trendy        words&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e588" id="d291e588"&gt;15&lt;/a&gt;]&lt;/sup&gt;and diagrams describing the IT/IS at the highest level        imaginable (the highest level of abstraction). Such diagrams have        nothing to do with what is the IS/IT really composed of and how do the        individual components interact with each other. &lt;br /&gt;The purposes of the business IT language is to evoke in        non-technical people who make IT purchase decisions that they have        some understanding of their IT system internals (but this is of course        a pure fiction). If managers get an delusive feeling they understand        the IS architecture they may start managing it; moving        boxes/components all around and filling missing gaps in the diagrams        by buying new components and “&lt;span class="quote"&gt;enhancing&lt;/span&gt;” their current        IS/IT architecture.&lt;br /&gt;What they are doing is not enhancing their company information        system, but they are enhancing the appearance of the high level        diagrams which are so far from the real information system, that they        have nothing to do with it any more. As a by-product they are paying        huge money to IT businesses.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="figure.architecture"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;1.&amp;nbsp;Building block of information systems&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e602" id="d291e602"&gt;16&lt;/a&gt;]&lt;/sup&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_63s3iNmUI/AAAAAAAADVs/fzSXRfhrcrc/s1600/a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_63s3iNmUI/AAAAAAAADVs/fzSXRfhrcrc/s320/a.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#figure.architecture" title="Figure 1. Building block of information systems" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;1, “Building block of information systems”&lt;/a&gt; shows one of the        semantically empty diagrams commonly used in Business IT. The level of        abstraction is so high the diagram contains no information about the        actual architecture of the IS/IT. It is rather a psychological tool        which shall address the fears and desires [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] of        the management deciding about purchases of new IS/IT        components.&lt;br /&gt;It displays the information system as a hierarchical entity        which reflects the organisational hierarchy in the company which the        management desires to preserve. The IS/IT may be viewed as a tool to        preserve their superiority as it provides specific components which        are aimed only for their hierarchical level and the other components        intended for the lower management or non-executive staff are somehow        subordinate to the monumental EIS (Executive Information System) top        of the pyramid.&lt;br /&gt;Also the IS/IT is viewed as composed of many different building        blocks magically related to the different activities and departments        present in the company organisation structure. This again addresses        the management fears and desires. The fears that the construction is        imperfect and some building blocks are missing which may disrupt all        the magnificent building. Or the desire to have a perfect pyramid with        all blocks nicely placed at their intended position, to have a better        and more stable pyramid than the competitors.&lt;br /&gt;The real quality of the IT/IS, how it is integrated with the        business processes, how it is useful in everyday tasks of the company        departments is hidden in a tiny sarcophagus deep inside the pyramid        where no manager can see.&lt;br /&gt;There are more Business IT examples of diagrams which are        misleading or even creating a false view of the IS reality which may        be highly unhealthy if we forget about how abstract is the level of        our real understanding&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e624" id="d291e624"&gt;17&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;Loosing touch with the reality because of being in a too        abstract level is not related only to non-technical people. The very        same issues may be experienced with architects which have lost contact        with developers and the code. They are living in an artificial world        of their UML or other design diagrams. They suffer a delusion that any        entity they draw in their diagram gets automagically implemented in        the very same scale as they have intended.&lt;br /&gt;They are constantly surprised that some aspect of the system        diverges from their design and blame the developers for that. On the        other hand, developers feel the architects are completely out of        picture and their contributions bring more obstacles than help to the        project progress.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.lifecycle"&gt;&lt;/a&gt;The project life-cycle&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;MMDIS describes the project life cycle as repetitive iteration        of the main project phases, see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#itemizedlist.lifecyclephases" title="The main phases [MMDIS1]" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;The main phases [&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]. It does not explicitly say        that the phases are sequential but it is also silence about how        parallel and interwoven those phases are.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h5 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.into.study"&gt;&lt;/a&gt;Feasibility Study&lt;/h5&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;From the agile point of view it is ok to recognize difference          in the activities during project implementation but it needs to be          clarified that those phases are highly parallel and they constantly          influence each other and their outputs need constant reevaluation.          Otherwise there is a risk that manufacturing mentality people          [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] will tent to set requirements in stone          during feasibility study, or that design mentality architect will          tent to capture persistent design schemes during global          analysis.&lt;br /&gt;Although it is not explicitly stated, the whole MMDIS project          life-cycle approach feels like a &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;plan before you          build&lt;/em&gt;&lt;/span&gt; approach (see [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;]). For          example, even MMDIS proposes an iterative approach in case the          project tents to be too large, the incremental subprojects shall be          planned in advanced in the feasibility study.&lt;br /&gt;&lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Plan before build&lt;/em&gt;&lt;/span&gt; is a good approach in          mechanical engineering but according to years of experiences it is          completely inappropriate [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;]          [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;] for IT. One of the issues is the IT project          design may actually look very good on paper but because of the          issues with abstraction partially described in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.abstraction" title="Levels of abstraction" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Levels of abstraction”&lt;/a&gt; the real implementation issues and          drawbacks cannot be predicted in the design stage and they will most          probably emerge afterward not earlier than during          implementation.&lt;br /&gt;Also in engineering areas (as e.g. bridge building) , the          design phase is only a fraction of the overall time, resources and          cost of the whole project. But according to [&lt;span class="citation"&gt;MC&lt;/span&gt;],          in IT the cost of design is highly over 50%. That's why design and          implementation (actual coding) in IT is a parallel interwoven          process which can hardly be separated. Of course those processes can          be forced to be separate, but the only achievement will be a more          time and money consuming project with loads of design documentation          as a by-product. Such documentation will anyway be — in the better          scenario — ignored and — in the worse scenario — forced to be          followed.&lt;br /&gt;In their seek for predictability, companies often use the          fixed price contract business model with fixed requirements agreed          on in advance as mentioned before in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.user.perspective" title="The User Perspective" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “The User Perspective”&lt;/a&gt;. On one hand it gives the          illusion of predictability but it is one of the most common reasons          for IT failures. Usually the victims are on both sides. The          development company losses the contractual money for not satisfying          the requirements and the business company looses time and maybe even          market position as their core business processes are not adequately          supported with the IT system as they require it          [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;Fixed price contract is a proper solution in building industry          or workmanship&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e682" id="d291e682"&gt;18&lt;/a&gt;]&lt;/sup&gt;, but it is inappropriate in IT which has completely          different characteristics.&lt;br /&gt;The agile answer to this problem is you simply can't fix all          properties (time, cost and scope) of the project in advanced          [&lt;span class="citation"&gt;SA&lt;/span&gt;]. Usually you fix the budget and time and          keep the scope flexible (but controlled).&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e695"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;2.&amp;nbsp;The iron(y) triangle [&lt;span class="citation"&gt;SA&lt;/span&gt;]&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_63w7OyMeI/AAAAAAAADV0/c6cCFkvalII/s1600/triangle.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_rwM3HrdhDr8/S_63w7OyMeI/AAAAAAAADV0/c6cCFkvalII/s320/triangle.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;This approach is accompanied by incremental development with a          heavily involved customer providing constant feedback. Such model          has many advantages for the customer. Especially very early          production results and constant feedback about the project state. On          the other hand, this model is not compatible with fixed planning in          advanced. We would experience constant diverging from the fixed          plan, similar to what will be experienced in the fixed price          contract scenario but with fatal consequences.&lt;br /&gt;In contrast, this model is constantly adapting to the ever          changing project state. This means even we can spot stages as          feasibility study or global analysis highlighting them as phases may          be misleading as those are constantly questioned and reworked during          the whole project progress.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h5 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e708"&gt;&lt;/a&gt;Global and detailed analysis&lt;/h5&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;MMDIS explicitly separates the phase of conceptual design          analysis and detailed analysis. This division may seem artificial          and there is very little advocation for it in          [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]. It seems like this division has been          made only because traditional software development methodologies          (especially the object-oriented methodologies, see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.intro" title="Introduction" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Introduction”&lt;/a&gt; ) do it also.&lt;br /&gt;As stated above &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.lifecycle" title="The project life-cycle" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “The project life-cycle”&lt;/a&gt; , design          is more than 50% of the project cost. We have to decide if we really          can afford the luxury of a separate conceptual design phase. Also as          we already state, design is not a one-time activity, it needs to be          updated constantly during the project life cycle. This means our          conceptual design needs to be constantly maintained and kept          synchronized with the ever changing requirements.&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;The question we have to ask at this stage&lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;What extra resources will it cost?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;What benefits it brings?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Does conceptual design bring more quality to the              project?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Are the benefits outreaching the costs?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;According to the authors experience conceptual design is          usually an overhead even in large scale projects. After a while when          deadlines get tight, conceptual design brings only frustration as          everybody in the team can clearly see how far did it diverge from          current state of the project. As such it can hardly be used as a          reliable source of documentation. It becomes purely a burden.&lt;br /&gt;Although not very useful for the project itself — to be fair —          it needs to be stated that there are political reasons why          conceptual design may be useful. Especially to proof the customer we          use a well-planned development methodology which may be very much          appealing to customers with the manufacturing and design          mentality&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e741" id="d291e741"&gt;19&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;In contrast to MMDIS, Agile approaches are usually quite          strict about discouraging people from doing too much          documentation&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e747" id="d291e747"&gt;20&lt;/a&gt;]&lt;/sup&gt;. For example in XP a complete conceptual design is          exactly the kind of think you should avoid [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1308" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XP&lt;/span&gt;&lt;/a&gt;].          Although there may be some exceptions, for example a quick design          meeting, but in this case you should:&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;keep them short&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;don't try to address all details&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;treat the resulting design as a sketch, not as a final              design&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;Martin Fowler [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1296" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF2&lt;/span&gt;&lt;/a&gt;] claims: “&lt;span class="quote"&gt;When you          do some up-front design, you'll inevitably find that some aspects of          the design are wrong, and you only discover this when coding. That's          not a problem providing that you then change the design. The trouble          comes when people think the design is done, and then don't take the          knowledge they gained through the coding and run it back into the          design&lt;/span&gt;”.&lt;br /&gt;The author of this article has witnessed several projects          where tuns of documentation has been produced by IT constancies in          years without actually producing any line of code. Such L'art pour          l'art approach to design is a pure disaster for the customer who may          be spending a fortune for nothing useful.&lt;br /&gt;Traditional plan-driven methodologies (see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.intro" title="Introduction" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Introduction”&lt;/a&gt;), with a similar project life-cycle to          MMDIS, are to be blamed. The ever changing requirements do not allow          teams to ever leave the conceptual design stage. Designing consumes          all their time. They keep adjusting the design so it is never          finished to be handed over to implementation and in a plan-driven          methodology developers can't really start their job unless the          design is perfectly polished.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h5 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.implementation"&gt;&lt;/a&gt;Implementation&lt;/h5&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;In contrast to the agile's detailed focus on implementation          techniques, MMDIS is not very verbose about this phase.&lt;br /&gt;It seem as if MMDIS would anticipate all the difficulties and          issues are concentrated in the preceding stages but implementation          is only a workmanship activity which mechanically translates the          all-explanatory design into code.&lt;br /&gt;The author of this article has seen brilliant designs turned          into junk by non-professional developers. Even with a perfect design          (and this is really an utopia, see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.into.study" title="Feasibility Study" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Feasibility Study”&lt;/a&gt;) still, most of the technical          problems need to be solved during implementation. If they are solved          in a unsatisfactory manner the perfect design as well as the whole          project may very easily get ruined.&lt;br /&gt;That's why developer's quality, their creativity, commitment,          team spirit and knowledge is absolutely crucial to the IT project's          success. In the real world, implementation is very often perceived          similarly as presented in MMDIS as a mechanical activity. Those are          the roots of a huge underestimation of the role of developers and          importance of code quality.&lt;br /&gt;This leads to a very unhealthy situation in the IT industry          where coding is seen as an inexperienced activity which is proceeded          by students, brigadiers or junior people in general. Everybody tries          to skip this disdainful sage of their career as quickly as possible          and they are heading to become more respected as analysis,          architects or project managers.&lt;br /&gt;The most important product of the software development becomes          the most marginalized element of the project. As a consequence, the          quality of software in general is declining&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e798" id="d291e798"&gt;21&lt;/a&gt;]&lt;/sup&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e806"&gt;&lt;/a&gt;More dimensions&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;There is a second group of dimensions which according to MMDIS        has to be taken to consideration in every stage of the project        life-cycle, see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#dimensions2" title="Second group of dimensions" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Second group of dimensions&lt;/a&gt;. At this stage MMDIS is        basically enumerating all sort of essentially disparate knowledge        which shall not be omitted to achieve an successful project and which        is glued together into entities called dimensions.&lt;br /&gt;MMDIS aim is probably to demonstrate how complex an IT project        domain really is and what all different aspects we need to take in        consideration. This may have a Wow-I-did-not-think-of-that effect on        IT beginners, but on the other hand, most of the highlighted points        are common knowledge to IT experts or they are very high-level to have        major impact on the way IT projects are managed.&lt;br /&gt;For example in the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;data and information        &lt;/em&gt;&lt;/span&gt;dimension MMDIS highlights the notorious definition of        data, information and knowledge, although it provides some useful        insight on different information characteristics which shall be kept        in mind and on the cost of keeping a certain information in a the        system. &lt;br /&gt;As part of the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;process and function        &lt;/em&gt;&lt;/span&gt;dimension MMDIS proposes to define hierarchical        decomposition of functions of the IT/IS from the high-level functions        to elementary functions and to define inputs, outputs and control data        for each function. The same is true for processes which may be        modelled in a hierarchical manner.&lt;br /&gt;As mentioned in the previous sections, such detailed        documentation may be a big overhead for most projects&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e827" id="d291e827"&gt;22&lt;/a&gt;]&lt;/sup&gt; and it may be very costly to keep such documentation in        sync with the changing reality. &lt;br /&gt;That's why Agile methodologies usually propose much more        lightweight approaches to capture customer requirements. &lt;br /&gt;For example Scrum works with the product backlog which contains        detailed description of the high-level required features and wish        lists which are prioritized by business value        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1315" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;SCRM&lt;/span&gt;&lt;/a&gt;]&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e837" id="d291e837"&gt;23&lt;/a&gt;]&lt;/sup&gt;. Such documentation is much easier to synchronize with        the ever changing requirements than heavy-weight UML diagrams which        needs to be synchronized first before changes may be propagated into        the code.&lt;br /&gt;A very significant portion of Agile methodologies focus on        methods to capture user requirements in the code directly and how to        manage constant requirement changes there. The relevant techniques are        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1247" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL2&lt;/span&gt;&lt;/a&gt;] [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1308" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XP&lt;/span&gt;&lt;/a&gt;]        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1315" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;SCRM&lt;/span&gt;&lt;/a&gt;]: refactoring, unit and functional testing,        keeping the design clean when refactoring rather than hacking new        features in etc...&lt;br /&gt;Another reason for detailed documentation is the risk of loosing        important people on the project and the need to train new stuff. Again        in this case functional and process diagrams would be of any use only        if they are perfectly in sync with the reality. Much more useful in        this situation is verbal guidance from the team members, customer        requirements and of course the code is the ultimate documentation for        the professionals.&lt;br /&gt;The &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;management &lt;/em&gt;&lt;/span&gt;dimension assigns role,        resources, responsibilities and does the overall planning. It defines        participation of IT specialists, top management and end-users in the        project.&lt;br /&gt;In general MMDIS defines the aims of the management dimension as        to optimize resource (people, financial...) consumption to achieve the        planed IT/IS requirements on time.&lt;br /&gt;The Agile methodologies are much more verbose on the role of        management in IT projects. The relationship between management and        developers is very fragile and crucial to the project success. As a        result of many examples of hostile management [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;]        Agile often emphasises that management shall not interfere into        matters which are only up to the IT professionals such as choice of        technology&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e867" id="d291e867"&gt;24&lt;/a&gt;]&lt;/sup&gt; (hardly any manager may understand the technology better        than IT professionals) or time estimates to develop a certain feature        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;On the other hand, even managers shall not interfere into the        matters of the development team whey shall not play a passive role.        Only managers have the authority and power to help the team in matters        where their power is insufficient. [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] says:        “&lt;span class="quote"&gt; Here, the manager uses their authority and political clout to        ensure that those outside the team play fair, to give the team every        chance of succeeding. For example, tackling bureaucracy, boosting        insufficient budgets, and repelling stubborn competitors and        saboteurs. That is, rather that directing their authority inwards to        command and control the team, the manager-as-referee directs their        power outwards to support the team, removing obstacles that the team        is powerless to address themselves.&lt;/span&gt;”&lt;br /&gt;For example, most of the Agile is based on communication and        development teams need constant access to business domain experts for        consultation. The role of management is to arrange such communication        channels [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;Another important role of the management is leadership. The role        of the team leader is helping the team find shared beliefs around        which to gel, and helping the team succeed repeatedly in their work        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;Further dimensions described in MMDIS highlight some facts about        IT systems which are obvious to people who participated in few IT        projects. For example:&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;For &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;labour, social and ethical            &lt;/em&gt;&lt;/span&gt;dimensions MMDIS emphasizes the importance of training.            Even a superb IT/IS has no value for the business if there are no            employees able to operate the system            [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;There needs to be sufficient hardware to run the IT/IS with            an appropriate number of users [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;].            &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;The &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;software&lt;/em&gt;&lt;/span&gt; dimension teaches us that            software is composed of software components. The choice has to be            made whether to use standard components which are already there or            to develop them from scratch&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e918" id="d291e918"&gt;25&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;The &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;economic&lt;/em&gt;&lt;/span&gt; dimension is really            crucial as it asks the question whether the gains of the IS/IT            really dwarf the costs.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;The &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;methodical and documentation&lt;/em&gt;&lt;/span&gt;            dimension defines tools and techniques which shall be used in the            project and the kinds of documentation which is produced during            implementation and maintenance.&lt;br /&gt;One of the methods used during software development is in            fact the methodology itself. [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;] emphasises            the importance of accepting a methodology by the team rather then            imposing it by the management. Accepting a methodology needs            commitment but this can hardly be achieved through imposing            anything. This will only lead to a stage where the methodology            will be violated whenever possible&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e939" id="d291e939"&gt;26&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e945"&gt;&lt;/a&gt;Dimensions summary&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;According to MMDIS various dimensions in various stages of the        project life-cycle do have stronger or weaker dependencies on each        other and their importance in a particular stage varies.&lt;br /&gt;To achieve a consistent and integrated IT/IS, no dimension may        be ignored, all the dimensions need to be taken in account in all the        project life-cycle phases [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;On the other hand this may be very difficult to achieve and all        the multidimensional approach stands and falls with the fact whether        the idea of propagating the high level strategic goals through all the        life-cycle phases, through out all the dimensions is really something        which is achievable in a real life project. There are so many levels,        so many abstractions on the way that one has to ask whether the        strategic visions don't get somehow distorted on the way down to        implementation.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="section.principles"&gt;&lt;/a&gt;Main principles&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;] further generalizes some of the MMDIS    concepts mentioned in previous sections into 11 main principles of    information system management.&lt;br /&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;Priciples&lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;Multidimensionality&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Integration&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Layering&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Flexibility&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Openness&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Standardization&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Cooperation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Process Management&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Learning and growth&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Resource localization&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;Measurability&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;Principles as a new concept introduced in    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;], seem to the author of this text as an aim to    generalize different MMDIS aspects into high level commonly applicable    approaches. This makes MMDIS less controversial and more flexible. As    stated in [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] a common issue in methodologies is to    find the proper level of specificity.&lt;br /&gt;A methodology being too specific can never cope with the complexity    of the real word. All possibilities can never be enumerated and the    methodology can never be made suitable for all sort of different    applications. Methodology maintainers trying to predict any possible    situation and provide guidance are creating methodology monsters which are    supposed to be suitable for all sort of very different tasks but failing    to do any of them in satisfactory manner.&lt;br /&gt;On the other hand being too generic means the methodology can    provide hardly any guidance in any specific situations. Telling only    generally accepted facts can hardly be questioned, but such methodology    isn't very useful either.&lt;br /&gt;Some of the statements in [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;] explaining the    principles tend to be quite high level and thus showing characteristics of    being pretty obvious or even tautologic in some situation.&lt;br /&gt;For example in order to succeed in creation of an information system    the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;multidimensionality&lt;/em&gt;&lt;/span&gt; principle tells you not to    omit any of the dimensions critical for succeeding.&lt;br /&gt;&lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Integration&lt;/em&gt;&lt;/span&gt; principle basically says that the a    system is not just the sum of its parts.&lt;br /&gt;&lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Layering&lt;/em&gt;&lt;/span&gt; is a common principle in IT. It is    hard to imaging any IS without layering applied so it is really    questionable if this is worth highlighting as a main principle of any    methodology.&lt;br /&gt;On the other hand the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;flexibility&lt;/em&gt;&lt;/span&gt; principle    mentions an very important and controversial issue in software    development. Beside the two possibilities mentioned in    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;] there are other options to gain    flexibility.&lt;br /&gt;Some Agile methodologies as XP for example propose to keep code    specific and only implement the required features (features which have a    relevant customer value) at a time, but keep the code clean so that    refactoring and changes are possible in the future without being too    painful.&lt;br /&gt;Object oriented methodologies (as mentioned in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.intro" title="Introduction" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Introduction”&lt;/a&gt;) on the other hand propose to define    extensibility points designed by architects featuring prophetic abilities.    But this approach did not show itself as being effective as prophetic    architects are quite scare on the IT labour market.&lt;br /&gt;Making the IS flexible through parameters (as proposed in    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;]) is definitely an option but extremely    expensive. Also the aim of parameterizing every aspect of the IS conducted    one of the most unhealthy phenomenon in IT history&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e1051" id="d291e1051"&gt;27&lt;/a&gt;]&lt;/sup&gt;; parametrized software monsters such as products made by    SAP, Siebel, Portal, Oracle and others. According to author's experience    such software products are common cause of software project    failures&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e1055" id="d291e1055"&gt;28&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;Parameters are great at presentations. They create an illusion of    flexibility. With few mouse clicks it is possible to completely change the    behaviour of the system to better suit the customer's business needs. This    usually does impress non-technical people who start to believe that    changing parameters of their company ERP is like configuring their    Outlook. They see more control over the software and less cost on IT    experts, but they are terribly wrong. &lt;br /&gt;The opposite is true. Control over the software shrinks only to    aspects which are configurable through parameters and changing those    parameters may have unpredictable results as the functionality influenced    by the parameters is a black-box&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e1063" id="d291e1063"&gt;29&lt;/a&gt;]&lt;/sup&gt; for the customer who now solely depends on the vendor's    documentation provided.&lt;br /&gt;The quality of documentation is usually very bad as there is no    incentive for the software vendors to reveal any details which could help    third parties to configure their software. On the contrary, they wish only    themselves or their certified partners are able to customize the software    which is lucrative service. &lt;br /&gt;Where source code is written in a standard language and thus    understandable to a wide range of IT experts, parameters are a proprietary    knowledge and experts need to pay to the software vendor to gain such    knowledge through certifications and trainings. &lt;br /&gt;This helps to creates an well thought encapsulated ecosystem where    the customer gets enslaved in after he makes the purchase decision. Every    time he needs to accommodate the IS to his changing business needs he pay    for it either to the software vendor himself or to somebody appointed by    the vendor who did already pay for this privileged and now he wants to get    his investment back.&lt;br /&gt;The whole system is supported by big consultancy companies (e. g.    Garner) who recommend such software vendors as market leaders. At the same    time their recommendation serves as advocacy for bad purchase decisions on    the customer side. No matter the customer replaced their previous software    solution which he had full control over with something which did not bring    any additional business value, no matter it is now twice as costly to    maintain the software and expensive external consultants need to be paid    to do so, but we did choose a market leader so our decision can't be    questioned!&lt;br /&gt;Parametrized software is not only good business for all involved    parties except the customer, it is also a an ugly technical solution.    Object oriented paradigm gave us the tool to model our domain directly    using objects so that our solution is understandable, clean and flexible    to changes. With parametrized software this principle gets distorted. We    do not create a domain model directly but rather a generic meta model    which is intended to interpret the actual domain model expressed in a    proprietary language. This introduces additional complexity, makes    implementation much more difficult and the overall solution less    transparent just to chain the customer to the vendor. &lt;br /&gt;To conclude flexibility can hardly be achieved through a    parametrized software but rather through a good design and availability of    the source code and this is related to another MMDIS principle -    &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;openness&lt;/em&gt;&lt;/span&gt;.&lt;br /&gt;With respect to openness [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;] does not    mention the important role of open source software. Having full source    code of your IS component gives the company flexibility and freedom of    choise. In contrary using a closed source solution may bring better    software quality in some cases, but as mentioned earlier it means high    risks of being too dependent on the vendor.&lt;br /&gt;On &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;standardization&lt;/em&gt;&lt;/span&gt; [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;]    claims: “&lt;span class="quote"&gt;a software solution gets cheaper and less complex when    standards are used&lt;/span&gt;”; but this statement can hardly be generalized.    It definitely depends on the problem and mainly on the standards involved    and their quality.&lt;br /&gt;For further information on MMDIS principles, see    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;].&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1104"&gt;&lt;/a&gt;From development to management&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;At the end of 90's MMDIS transformed from a methodology which    primarily focuses on development of information systems to a methodology    which has a larger scope [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;]. Development is seen    as only a fraction of the overall effort to manage an information system    and IT services within companies.&lt;br /&gt;On the other hand it is important to emphasis that the quality of    the developed software highly depends on the development process. Moreover    the software's quality highly influences the quality of the overall    information system and how it is capable to support the company processes.    Using the MMDIS language, software development process is one of the most    important dimensions which can't be omitted when taking about information    systems. Marginalizing software development and it's importance may have    similar effects as underestimating the implementation phase as discussed    in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.implementation" title="Implementation" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Implementation”&lt;/a&gt;.&lt;br /&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;] did not bring any significant updates to    the software development aspects of the methodology depicted in    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]. It only generalizes some of the approaches as    for example the high level principles of the methodology (see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#section.principles" title="Main principles" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Main principles”&lt;/a&gt;). This means a company willing to practice    MMDIS who is doing also software development (not outsourcing it) needs to    adhere to principles which haven't been significantly updated for years    and which ignores most of the recent development which has especially been    set on in the Agile camp.&lt;br /&gt;Anyway the management extension to MMDIS it out of scope of this    article which primarily focuses on software development methodologies in    the narrow sense. For more information, see    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1189" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS2&lt;/span&gt;&lt;/a&gt;].&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1130"&gt;&lt;/a&gt;Conclusion&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The uniqueness of using MMDIS for software development originates    from structuring aspects of IT projects into dimensions and focusing on    aspects which according to [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;] has been neglected    in other software methodologies such as the organizational, labour and    economic dimension. But the question here is: Is this really a sufficient    value added to form and maintain yet another methodology?&lt;br /&gt;MMDIS is ignoring many aspects which has been researched in the    Agile camp over the last two decade. Although agile inventions such as    prototyping or incremental development are mentioned within the scope of    MMDIS, they are mentioned independently on the rest of the methodology    only as an extension, not an integral part of the project    life-cycle.&lt;br /&gt;Even MMDIS is not a typical plan-driven methodology there is a risk    of potential practitioners to understand it as such. On the other hand the    plan-driven essence gives it an interesting marketing bonus as it may sell    well to people with the manufacturing and design wordview. Even MMDIS    could be possibly executed in an Agile manner, there is very little in the    methodology itself which would encourage users to do so.&lt;br /&gt;Ignoring the above, MMDIS is still an interesting reading. It is a    nice compilation of advice and precepts which obviously have their roots    in practical IT experiences.&lt;br /&gt;Also MMDIS holistic approach to IS/IT is quite rare and interesting.    Where other methodologies focus on the development process or on the    software itself, MMDIS tries to see the Information System as a whole in    all its complexity (dimensions) within the organisation structure of the    company.&lt;br /&gt;It is interesting to state that the Agile and MMDIS share one of the    main principles. The holy grail of Agile is customer satisfaction which is    embodies in MMDIS through the ubiquitarian effort the keep the developed    system at every stage and in every detail conforming to the high-level    strategic vision of the company.&lt;br /&gt;MMDIS is trying hard to explain how high level strategic visions    along with other customer requirements get transformed from one project    stage to another, from abstract constructs to the detailed ones through    all dimensions, so that finally every elementary function in the system is    in sync with the global strategic vision of the top management.&lt;br /&gt;This sounds really amazing, but also it is difficult to believe that    something similar is possible in everyday IT projects. On the other hand    again it is great marketing. What may sound better to the ears of managers    than a methodology which is somehow able to encode their beautiful visions    in the very genetic essence of their company Information System.&lt;br /&gt;To conclude, even MMDIS brings some interesting ideas the author of    this article would recommend it as additional knowledge to be read but not    to be used in most of the every day software development projects (even    this depends on the scale and scope of the projects and on how fixed are    the requirements)&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e1154" id="d291e1154"&gt;30&lt;/a&gt;]&lt;/sup&gt;.&lt;br /&gt;On the other hand MMDIS is a perfect &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;marketing    methodology&lt;/em&gt;&lt;/span&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e1162" id="d291e1162"&gt;31&lt;/a&gt;]&lt;/sup&gt;. It is common routine for IT companies to have two or more    methodologies. One which they really practice and other methodologies    which they use as a marketing tool for certain type of customer, because    they know they will appeal to their type of thinking or they are required    by the customer.&lt;br /&gt;Practicing Agile helps the company to be competitive and to create    software efficiently, but for customers with the manufacturing mentality    [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;], Agile is a synonym for anarchy and chaos&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#ftn.d291e1172" id="d291e1172"&gt;32&lt;/a&gt;]&lt;/sup&gt;. Knowing the IT supplier practices a nice well-defined    methodology with comprehensive planning and detailed design documentation    such as MMDIS may be a big benefit in their eyes.&lt;br /&gt;That's exactly the way many plan-driven methodologies survived until    now. The only issue with MMDIS is, it is not know on a world-wide scale.    Managers usually don't read software methodology books. Usually they find    their way through unknown using buzzwords and MMDIS won't probably ring a    bell.&lt;/div&gt;&lt;div class="content-bibliography"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="biblio"&gt;&lt;/a&gt;Bibliography&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1182"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;MMDIS1&lt;/abbr&gt;]  Voříšek, J.:&lt;span class="content-title"&gt;Strategiské řízení    informačního systému a systémová integrace&lt;/span&gt;. 1999. ISBN    80-85943-40-9&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1189"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;MMDIS2&lt;/abbr&gt;]  Voříšek, J.:&lt;span class="content-title"&gt;Principy a modely    řízení podnikové informatiky&lt;/span&gt;. Praha, 2008. ISBN    978-80-245-1440-6&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1196"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;VOR1&lt;/abbr&gt;]  Voříšek, J.:&lt;span class="content-title"&gt;Principy    strategického řízení informačního systému&lt;/span&gt;. 1998. &lt;span class="content-bibliomisc"&gt;URL:    http://nb.vse.cz/~vorisek/FILES/Clanky/1998_Principy_strategickeho_rizeni_IS.htm&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1208"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;VOR2&lt;/abbr&gt;]  Voříšek, J., Bruckner, T.:Outsourcing    IS/IT z hlediska zadavatelského podniku. 1998. &lt;span class="content-bibliomisc"&gt;URL:    http://nb.vse.cz/~vorisek/FILES/Clanky/1998_Outsourcing_IS.htm&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1217"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;AM&lt;/abbr&gt;] &lt;span class="content-title"&gt;Manigesto for Agile Software    Development&lt;/span&gt;. 2001. &lt;span class="content-bibliomisc"&gt;URL:    http://agilemanifesto.org&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1228"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;EA&lt;/abbr&gt;]  Gelperin, D.:&lt;span class="content-title"&gt;Exploring    Agile&lt;/span&gt;. 2008. ISBN:978-1-60558-021-0&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1235"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;AL&lt;/abbr&gt;]  Lauther, A.:&lt;span class="content-title"&gt;Software Project    Cultures&lt;/span&gt;. 2008. &lt;span class="content-bibliomisc"&gt;URL:    http://anthony.lauder.googlepages.com/SoftwareProjectCultures.pdf&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1247"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;AL2&lt;/abbr&gt;]  Lauther, A.:&lt;span class="content-title"&gt;Selling agile to    CEO&lt;/span&gt;. 2008. &lt;span class="content-bibliomisc"&gt;URL:    http://anthony.lauder.googlepages.com/sellingagile&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1259"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;WF&lt;/abbr&gt;]  Royce, W.:&lt;span class="content-title"&gt;Managing the development    of large software systems&lt;/span&gt;. 1970. &lt;span class="content-bibliomisc"&gt;URL:    http://www.cs.umd.edu/class/spring2003/cmsc838p/Process/waterfall.pdf&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1271"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;AS&lt;/abbr&gt;]  Ambler, S.:&lt;span class="content-title"&gt;Agile on a fixed    budget&lt;/span&gt;. 2007. &lt;span class="content-bibliomisc"&gt;URL:    http://www.ddj.com/architect/201202925&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1283"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;MF&lt;/abbr&gt;]  Fowler, M.:&lt;span class="content-title"&gt;The New    Methodology&lt;/span&gt;. 2005. &lt;span class="content-bibliomisc"&gt;URL:    http://martinfowler.com/articles/newMethodology.html&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1296"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;MF2&lt;/abbr&gt;]  Fowler, M.:&lt;span class="content-title"&gt;Is Design    Dead?&lt;/span&gt;. 2005. &lt;span class="content-bibliomisc"&gt;URL:    http://martinfowler.com/articles/designDead.html&amp;nbsp;    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1308"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;XP&lt;/abbr&gt;]  Beck, K., Andres, C.:&lt;span class="content-title"&gt;Extreme    Programming Explained&lt;/span&gt;. 1999. ISBN: 02-01616-41-6&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1315"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;SCRM&lt;/abbr&gt;]  Schwaber, K., Beedle, M.:&lt;span class="content-title"&gt;Agile    Software Development with Scrum&lt;/span&gt;. 2001. ISBN:    01-30676-34-9&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1322"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;OOM&lt;/abbr&gt;]  Ramsin, R., Paige,    R.:&lt;span class="content-title"&gt;Process-Centered Review of Object Oriented Software Development    Methodologies&lt;/span&gt;. 2008. ISSN: 0360-0300&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1329"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;MFM&lt;/abbr&gt;]  Maurer, F., Melnik, G.:&lt;span class="content-title"&gt;Agile    methods: moving towards the mainstream of the software industry&lt;/span&gt;.    2006. ISBN:1-59593-375-1&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677" id="d291e1336"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;APM&lt;/abbr&gt;]  Hochmüller, E., Mittermeir, R.:Agile    process myths. 2008. ISBN:978-1-60558-021-0&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="footnotes"&gt;&lt;br /&gt;&lt;hr align="left" width="100" /&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e74" id="ftn.d291e74"&gt;1&lt;/a&gt;] &lt;/sup&gt;Even already the original article by W. Royce claims that the        waterfall technique is not intended for large projects, the waterfall        approach become very popular in many methodologies which omitted the        iterative nature proposed in the original article. This demonstrates        that misinterpretation is the biggest enemy of any methodology.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e78" id="ftn.d291e78"&gt;2&lt;/a&gt;] &lt;/sup&gt;Such methodologies include for example Structured Analysis and        Design Techniques (SADT), The Yourdon Systems Method (YSM),        Specification and Description Language (SDL), Information Engineering        and Jackson System Development (JSD), Capability Maturity Model (CMM),        some approaches based on Rational Unified Process (RUP) and other        methodologies which involve a waterfall-like approach.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e95" id="ftn.d291e95"&gt;3&lt;/a&gt;] &lt;/sup&gt;This approach is referred to as loose coupling between        objects.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e104" id="ftn.d291e104"&gt;4&lt;/a&gt;] &lt;/sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] explains why focusing on the design may        be wrong and [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1296" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF2&lt;/span&gt;&lt;/a&gt;] shows how design is still        present in Agile but in a slightly different embodiment.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e118" id="ftn.d291e118"&gt;5&lt;/a&gt;] &lt;/sup&gt;Methodologies such as XP, Scrum, Crystal, FDD and other are        commonly considered as agile, see [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1308" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XP&lt;/span&gt;&lt;/a&gt;] or        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1315" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;SCRM&lt;/span&gt;&lt;/a&gt;].&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e147" id="ftn.d291e147"&gt;6&lt;/a&gt;] &lt;/sup&gt;Although those are very high-level principles which may be very        easily misinterpreted as stated in [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1228" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;EA&lt;/span&gt;&lt;/a&gt;]&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e172" id="ftn.d291e172"&gt;7&lt;/a&gt;] &lt;/sup&gt;Note that this is true if we compare MMDIS with the plan-driven        methodologies, but from the agile point of view MMDIS seems much more        strict and rigid.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e303" id="ftn.d291e303"&gt;8&lt;/a&gt;] &lt;/sup&gt;One of such methodologies is Extreme Programming          [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1308" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XP&lt;/span&gt;&lt;/a&gt;], which on one hand makes customer          satisfaction the main aim of the development process and adjusts all          the proposed best practices to achieve it, but it is not too much          focused on whether the customer requirements are really in sync with          their strategic goals which is let to the company to judge.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e336" id="ftn.d291e336"&gt;9&lt;/a&gt;] &lt;/sup&gt;This is a nice goal, but it may be very difficult to achieve.          It seems as MMDIS is not very verbose on how to achieve such          kalokagathic state of the project.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e349" id="ftn.d291e349"&gt;10&lt;/a&gt;] &lt;/sup&gt;Ideally they shall be confronted with a running prototype            application.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e366" id="ftn.d291e366"&gt;11&lt;/a&gt;] &lt;/sup&gt;Some methodologies work with a predictable process            (especially the plan-driven methodologies). As predictability is a            very desirable feature for management it is always very tempting            to use a predictable methodology. But using a predictable            methodology on a unpredictable field is very likely to cause            project failures.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e434" id="ftn.d291e434"&gt;12&lt;/a&gt;] &lt;/sup&gt;According to MMDIS, all of the phases need to be compliant            with the global enterprise strategy and IT strategy.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e471" id="ftn.d291e471"&gt;13&lt;/a&gt;] &lt;/sup&gt;As in XP where phases are iteratively executed at the scale            of days and weeks or the sprint in Scrum as the smallest unit of            usable software increment.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e554" id="ftn.d291e554"&gt;14&lt;/a&gt;] &lt;/sup&gt;Large in terms of functionality covered and internal            complexity of the system. Those projects basically involve            implementation of very large systems similar in scale to what has            been developed by hundreds or even thousands of people for several            years by the competition.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e588" id="ftn.d291e588"&gt;15&lt;/a&gt;] &lt;/sup&gt;Those are commonly referred to as buzzwords. The set of            terms to describe the same thing in IT usually completely changes            over a year so that same things are described with completely            different words but those words are trendy and appealing. The aim            is to achieve an impression of innovation and high tech even the            only novelty came from the marketing teams.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e602" id="ftn.d291e602"&gt;16&lt;/a&gt;] &lt;/sup&gt;This diagram was taken from              [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;]&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e624" id="ftn.d291e624"&gt;17&lt;/a&gt;] &lt;/sup&gt;Another example are the famous Garthner magic quadrants.            From the authors personal experience the more is a certain product            judged as being visionary and the more as being able to execute            the more ugly is the technical solution of the product, the more            non-standard components are used, the more time will it require to            integrate the solution into the company's IT infrastructure and of            course the more money will be spent on the licenses and the more            will cost the consultations.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e682" id="ftn.d291e682"&gt;18&lt;/a&gt;] &lt;/sup&gt;It is in interesting coincidence that              [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1182" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MMDIS1&lt;/span&gt;&lt;/a&gt;] really demonstrates the project              life-cycle on a building industry metaphor.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e741" id="ftn.d291e741"&gt;19&lt;/a&gt;] &lt;/sup&gt;They automatically assume that if the plan-driven              processes work fine in their industry they are in a similar              manner applicable in IT.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e747" id="ftn.d291e747"&gt;20&lt;/a&gt;] &lt;/sup&gt;Although there are some examples of a co-existence of              conceptual design with agile. Also [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;]              argues that documentation is not automatically the source of all              evil.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e798" id="ftn.d291e798"&gt;21&lt;/a&gt;] &lt;/sup&gt;This is the author's personal opinion, there can hardly be              any proof for that as software quality is highly intangible. But              from the authors experience many companies started as geek's              undertaking which a perfect product with a very high ratio of              technical people. But as a result of a typical life-cycle of              such start-ups, the ratio of technical people starts to decrease              in favour of management, marketing and sales, who are taking              more and more superior role in the business.&lt;br /&gt;As a result the product quality decreases, innovation              stops and the only thing which persists are the business people              who try to exploit the original idea to the limit, but they are              of course unable to bring any new ideas in.&lt;br /&gt;Fortunately for the industry there is usually already              another bunch of geeks grounding another brand new start-up. If              they are lucky enough the business spongers won't occur too              early. Let's keep fingers crossed for them.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e827" id="ftn.d291e827"&gt;22&lt;/a&gt;] &lt;/sup&gt;MMDIS actually does not give a project scope and scale when            it is relevant to do such detailed documentation. This may lead to            an impression that it is proposed in any scope and scale which            would be ridiculous.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e837" id="ftn.d291e837"&gt;23&lt;/a&gt;] &lt;/sup&gt;The backlog is constantly updated and synchronized with the            customer by the product owner - one of the Scrum roles which            represent the interest of the stakeholders, usually working on the            customer side. The development team on the other hand assigns            estimated development effort to the backlog. The features with the            highest business value first and the shortest effort estimate are            implemented first. The customer requirements - called also user            stories (small pieces of papers containing 1-2 sentences of            captured requirements edited by customer representatives) are            directly transformed into code and both serve as the project's            ultimate documentation. &lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e867" id="ftn.d291e867"&gt;24&lt;/a&gt;] &lt;/sup&gt;The choice of technology can easily become a political            decision. This leads to a huge risk of project failure. Only the            IT professionals are capable of deciding whether the requirements            can or cannot be fulfilled through a certain technology            [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1283" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;MF&lt;/span&gt;&lt;/a&gt;].&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e918" id="ftn.d291e918"&gt;25&lt;/a&gt;] &lt;/sup&gt;An important question is also whether to use open source                components which are usually more transparent, customizable                and maintainable or whether to use third party components and                rely on the third party support and loose control over the                particular component.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e939" id="ftn.d291e939"&gt;26&lt;/a&gt;] &lt;/sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1235" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL&lt;/span&gt;&lt;/a&gt;] has a similar opinion. We                already mentioned his division of people mentalities into                manufacturing, design and customer cultures. Further more he                states — it is difficult to use an agile methodology in a camp                with dominant manufacturing or design methodology as well it                would cause incredible issues to apply a waterfall process in                the customer culture camp. The reason is, people won't be                committed to a process which is in contrast to their                worldview. Changes of the culture in a company is possible but                very painful and risky.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1051" id="ftn.d291e1051"&gt;27&lt;/a&gt;] &lt;/sup&gt;This is author's personal opinion, based on his IT industry        experiences.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1055" id="ftn.d291e1055"&gt;28&lt;/a&gt;] &lt;/sup&gt;The author's claim is among others based on his own experiences        with a tiny Sibel project which did at least 10 times exceeded it's        original budget and time-frame and after 3 years of implementation it        is still under development. A similar project could have been        implemented from scratch in few week time. &lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1063" id="ftn.d291e1063"&gt;29&lt;/a&gt;] &lt;/sup&gt;Because the provided software is closed source.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1154" id="ftn.d291e1154"&gt;30&lt;/a&gt;] &lt;/sup&gt;At this point it is important to recall that MMDIS is not        restricted to software development but has a wider scope which has not        been examined in this text.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1162" id="ftn.d291e1162"&gt;31&lt;/a&gt;] &lt;/sup&gt;The author of this article calls a marketing methodology the one        which is not to be followed but which is to be announced to be        followed for obvious reasons.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1172" id="ftn.d291e1172"&gt;32&lt;/a&gt;] &lt;/sup&gt;They don't realize how disciplined in fact Agile is        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=9052211308399947677#d291e1247" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;AL2&lt;/span&gt;&lt;/a&gt;]. For example XP is a highly disciplined        process which is very demanding in terms of the practitioners.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-9052211308399947677?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/9052211308399947677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/critical-analysis-of-mmdis-concepts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/9052211308399947677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/9052211308399947677'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/critical-analysis-of-mmdis-concepts.html' title='Critical analysis of MMDIS concepts'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_rwM3HrdhDr8/S_63s3iNmUI/AAAAAAAADVs/fzSXRfhrcrc/s72-c/a.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-5763138203519906119</id><published>2010-05-27T11:16:00.001-07:00</published><updated>2010-05-27T11:33:51.925-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>NVDL — a Breath of Fresh Air for Compound Document Validation (XTech2007)</title><content type='html'>&lt;div class="content-article" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;div class="content-author"&gt;&lt;h3 class="content-author"&gt;&lt;span class="firstname"&gt;Jirka&lt;/span&gt; &lt;span class="surname"&gt;Kosek&lt;/span&gt;&lt;/h3&gt;&lt;div class="content-affiliation"&gt;&lt;span class="content-orgname"&gt;University of Economics, Prague&lt;/span&gt; &lt;span class="content-orgdiv"&gt;LISp (Laboratory for Intelligent Systems Prague)&lt;/span&gt;&lt;br /&gt;&lt;div class="content-address"&gt;&lt;span class="street"&gt;W.&amp;nbsp;Churchill&amp;nbsp;Sq.&amp;nbsp;4&lt;/span&gt;&lt;br /&gt;&lt;span class="city"&gt;130&amp;nbsp;67&amp;nbsp;Praha&amp;nbsp;3&lt;/span&gt;&lt;br /&gt;&lt;span class="country"&gt;Czech&amp;nbsp;Republic&lt;/span&gt;&lt;br /&gt;&lt;code class="content-email" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;a href="mailto:jirka@kosek.cz"&gt;jirka@kosek.cz&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-author"&gt;&lt;h3 class="content-author"&gt;&lt;span class="firstname"&gt;Petr&lt;/span&gt; &lt;span class="surname"&gt;Nálevka&lt;/span&gt;&lt;/h3&gt;&lt;div class="content-affiliation"&gt;&lt;span class="content-orgname"&gt;University of Economics, Prague&lt;/span&gt; &lt;span class="content-orgdiv"&gt;Department of Information and Knowledge Engineering&lt;/span&gt;&lt;br /&gt;&lt;div class="content-address"&gt;&lt;span class="street"&gt;W.&amp;nbsp;Churchill&amp;nbsp;Sq.&amp;nbsp;4&lt;/span&gt;&lt;br /&gt;&lt;span class="city"&gt;130&amp;nbsp;67&amp;nbsp;Praha&amp;nbsp;3&lt;/span&gt;&lt;br /&gt;&lt;span class="country"&gt;Czech&amp;nbsp;Republic&lt;/span&gt;&lt;br /&gt;&lt;code class="content-email" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;a href="mailto:petr@nalevka.com"&gt;petr@nalevka.com&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-abstract"&gt;&lt;div class="title"&gt;&lt;b&gt;Abstract&lt;/b&gt;&lt;/div&gt;Compound document is a document that consist of elements andattributes from different mark-up vocabularies (namespaces). Thisapproach to document engineering is very effective because it allowsreusing existing markup technologies in a novel ways. Howevervalidation of such documents is a big challenge. It is very hard tocreate complex combined schemas in RELAX NG or W3C XML Schema forvalidation of compound documents. Instead advantages of using NVDL asa validation language are explained in this article. Further, our ownimplementation called JNVDL is introduced. The second part of the articledeals with problems of recognizing different versions ofa single XML vocabulary. Finally, an extension of the NVDL language able tosolve this problem is introduced.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;div class="toc"&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#intro"&gt;Introduction&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#compound-documents"&gt;Compound documents&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e135"&gt;The Web environment&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e151"&gt;Examples of application&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#validation"&gt;Validation of compound documents&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e198"&gt;XML Schema or RELAX NG is insufficient&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#nvdl"&gt;NVDL is the right solution&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#jnvdl"&gt;JNVDL&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e373"&gt;Implementation issues&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#versioning"&gt;Impact on a Web architecture&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e389"&gt;Namespace is not a document type&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e399"&gt;Versioning namespaces&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e459"&gt;Extending NVDL to support versioning&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#related-work"&gt;Related work&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#future-work"&gt;Future work&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#conclusions"&gt;Conclusions&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="bibliography"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#biblio"&gt;Bibliography&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="intro"&gt;&lt;/a&gt;Introduction&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;This article deals with compound document validation. In the&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#compound-documents" title="Compound documents" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Compound documents”&lt;/a&gt; advantages and the current usageof compound documents is described. The next part (&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#validation" title="Validation of compound documents" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Validation of compound documents”&lt;/a&gt;) shows insufficiency of classical schemalanguages for validation of compound documents. NVDL language isproposed as a solution to this problem in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#nvdl" title="NVDL is the right solution" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “NVDL is the right solution”&lt;/a&gt;. Thesecond part of this article introduces our implementation of NVDLcalled JNVDL (&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#jnvdl" title="JNVDL" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “JNVDL”&lt;/a&gt;) and problems which were solvedduring implementation of the NVDL standard. The last part of this article(&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#versioning" title="Impact on a Web architecture" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Impact on a Web architecture”&lt;/a&gt;) deals with the problem of versioningdocument types and proposes some NVDL extensions which can be used tosolve problem of several different document types residing in onenamespace.&lt;br /&gt;Open-source implementation of NVDL validator and proposed NVDLextensions could be considered as the main contribution of our workdescribed in this paper.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="compound-documents"&gt;&lt;/a&gt;Compound documents&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Compound document is a modern name for XML documents thatconsist of elements and attributes from different mark-upvocabularies. In other words, by combining two or more different XMLlanguages in a single document we create a compound document. This wasmade technically possible thanks to XML Namespaces. In general, theNamespaces in XML recommendation[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e578" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;NS&lt;/span&gt;&lt;/a&gt;] solvesproblems of collision and recognition of elements and attributes fromdifferent mark-up vocabularies within one XML document. This isachieved through qualified names, that make different vocabularyelements or attributes distinguishable even they use the same localnames.&lt;br /&gt;At first, some people considered namespaces to be a hostileelement polluting XML with additional complexity without anyreasonable need for it. At this time, the world of mark-upvocabularies has been dominated by over-grown monolithic languages,but soon they faced serious extensibility issues. The set of problemsa language addresses is growing and evolving over time. To keep-upwith the changing requirements, the monolithic approach constantlypollutes the vocabulary with new closely specific mark-up. Asa result, we see extensive, difficult to learn and difficult tomaintain languages, which are intended to solve all sort of problems,but not solving any of them in a satisfactory manner.&lt;br /&gt;Recently, it is more and more obvious that some extensibilityproblems may be solved smarter using composition of more differentsingle-purpose languages rather than further extending the monolithiclanguage. If there already exists a widely adopted and understoodvocabulary, which solves part of our problem, it makes a good sense toreuse it rather than introducing something new. With this approach,we gain an immense flexibility, as for every specific problem, we canadopt a specific combination of vocabularies.  &lt;br /&gt;Isolated single-purpose languages are easier to maintain andwhat is even more important, they can be easily reused in distinctapplications. The domain of such languages is narrow and their aim iswell defined, which helps to keep the language free of indiscreetextensions.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e135"&gt;&lt;/a&gt;The Web environment&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;HTML is a good example of a shift from a standalone language tothe use of compound documents. At first, HTML was a simple format forpublishing mostly scientific articles and for linking themtogether. Soon the Web became incredibly popular and widelyadopted. It didn't serve just as a standard for publishing electronicdocuments, but it also become a standard way to create distributeduser interfaces for various information systems.&lt;br /&gt;The tendency to use or misuse HTML to solve all sorts ofdistinct problems slowly polluted the language with various indiscreetproprietary extensions. Browser and other software vendors werepromptly introducing new user-oriented features to gain a competitiveadvantage, without having a long term vision of the languagedevelopment in mind. All those issues slowly caused the Web wasloosing one of its main advantage; cross-platforminteroperability.  &lt;br /&gt;The situation has significantly improved after standardizationof the language (under W3C). The language has been purified from mostof the presentational aspects and HTML has been made fully XML based(XHTML). But the major improvement was modularization of XHTML (see[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e675" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XHTMLMOD&lt;/span&gt;&lt;/a&gt;]). The language became more flexible andadaptable in various environments for various tasks. Modularizationallows to use a subset of HTML features that most reflects ourparticular needs. Logically related aspects of the language aredecomposed into modules such as e. g. structure module with the mainHTML structure, table module for expressing tabular data, text modulefor organizing texts into headings and paragraphs, forms module todefine user interfaces, meta-information module to attach meta-data todocuments, image module for images, link module to hyperlink ourdocuments etc.&lt;br /&gt;For addressing different problems, we can use different XHTMLmodules. For example, it doesn't make sense to use the forms modulewhen publishing a simple electronic document. Moreover, we may look atmodules as default vocabulary fragments with limitedexpressiveness. They can be left out completely (if not needed), butthey can also be replaced by a whole different specialized andfeature-rich language. This can be clearly spotted as the currenttrend in Web standards. Instead of the forms module, we can useXForms, RDF can replace the meta-information module, link module canbe overridden by XLink, instead of images we can directly embed SVGvector graphics and so on.&lt;br /&gt;To conclude, compound documents make Web more flexible andpowerful. It makes it suitable for all sort of very differentapplications. Every specific problem can be addressed by a customcombination of highly specialized languages. If we follow this line ofthinking, at some point we realize, there is no need for HTML anymore.The only think needed is a parent language to embed all thevocabularies which best suit our intentions. The XHTML structuremodule is a good candidate, but a completely different language canserve this purpose as well. As an example, imagine a Web application,where SVG takes the role of the parent language and embedded XForms isused to define the user interface. As SVG is a powerful presentationallanguage and XForms is the latest declarative and feature-rich userinterface standard, such combination of languages may be considered asthe best solution to a particular problem.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e151"&gt;&lt;/a&gt;Examples of application&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;There are many different applications of compound documents inmany different areas. When once adopted, composition of differentvocabularies seems as a natural and convenient approach to manyproblems. One of the first application of compound documents ever weretemplating languages. The W3C XSL Transformations recommendation hasbeen published just few months after Namespaces in XML. XSLT is apopular templating language, which can express rules for transforminga source XML tree into a result tree. The particular rules areexpressed using the XSLT vocabulary and they contain embeddedfragments of the result tree vocabularies. This means XSLT stylesheetsare basically compound documents.&lt;br /&gt;In addition, XML is widely used as a data exchange format. Innon-trivial cases, there is a protocol such as for example SOAP toexchange structured XML messages. SOAP messages are again compounddocuments as they consist of an envelope (SOAP vocabulary) whichencapsulates the actual message payload (arbitraryvocabulary).&lt;br /&gt;Compound documents are perfectly applicable also for officedocument formats. In this case, various differently structured data asstructured text, tables, graphs, diagrams, spreadsheets need to beincorporated into one document. This is the right task for XML, as itfeatures the right combining mechanisms and there are many specializedand mature XML vocabularies ready to be reused within the officedocuments. Lets mention the Open Document Format (ODF) as an exampleof XML being successfully used in various office bundles as the nativedocument format.&lt;br /&gt;As mentioned previously, the Web offers huge opportunities forcompound documents and those haven't been really exploited yet. One ofthe problems is the lacking client support for the new standards. Thesituation is far better among the mobile device clients than on thedesktop. Despite those issues, there are already some interestingcompound document solutions, which may be used with some compromisesin most today's mainstream browsers. Among of all, a good example ofa Web compound document concept is the xH language, presented at theWWW2006 conference[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e558" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XH&lt;/span&gt;&lt;/a&gt;]. It is basicallya synthesis of XHTML and several other well-know standard XMLlanguages; mainly XForms, SVG and MathML. Interaction of thedifferent language blocks is achieved through JavaScript.&lt;br /&gt;All the languages recommended by xH are widely used andwell-known. But the value added and the major intention of xH is toencourage people to use those languages in combination to build a newgeneration of rich and flexible Web application with enhanced userexperience.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="validation"&gt;&lt;/a&gt;Validation of compound documents&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;XML namespaces technically allow presence of multiplevocabularies inside one XML document, but there are many other issues,which need to be addressed, before we can adopt a compound documentsolution. Having descriptions of syntax and semantics of theparticular vocabularies is insufficient for the client applicationto handle compound documents correctly. In addition, we need to havealso syntax and semantics defined for the compoundlanguage.&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ftn.d292e172" id="d292e172"&gt;1&lt;/a&gt;]&lt;/sup&gt;&lt;br /&gt;Different vocabulary fragments can be combined in many differentways and even the isolated fragments are meaningful (in respect totheir language semantics) and they are syntactically correct, thecombination of such fragments can be difficult to interpret or it canbe even semantically empty.&lt;br /&gt;As an example, imagine we have an XHTML document which consistsof a &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt; section, used to place document relatedmeta-data, and a &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;body&lt;/code&gt; section, intended to berendered. Placing an RDF meta-data fragment into the&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;body&lt;/code&gt; section would cause interpretationdifficulties, as meta-data are not intended to be rendered. The correctplace to put the fragment is of course the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt;section.&lt;br /&gt;This implies, there are two major issues concerning compounddocuments. First, we need to create semantics for different compoundlanguages to make them correctly interpretable by differentapplications. Second, we need to constrain the way different languagesare combined together by allowing just meaningful combinations. Thisrequires some kind of a “&lt;span class="quote"&gt;meta-schema&lt;/span&gt;” to express suchconstraints.&lt;br /&gt;Today, automated validation is absolutely essential forstandalone XML languages to ensure their syntactical correctness andthus interoperability. But this is even more important for compounddocuments, as they bring additional interpretation complexity. To makecompound documents applicable in a heterogeneous environment (as theWeb environment for example), it is absolutely essential to providepowerful compound document validation tools and techniques. Thisrequires schema languages able to cope with multiple namespaces andvalidation engines able to check document instances against suchschemas. In the following sections we will discuss two distinctapproaches to compound document validation.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e198"&gt;&lt;/a&gt;XML Schema or RELAX NG is insufficient&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;One approach to face the compound document validation problem isto use namespace support included in today's mainstream schemalanguages; e. g. in RELAX NG or XML Schema. Those namespace-awareschema languages use qualified names to define elements andattributes, thus compound document schemas can be created easily justby specifying the appropriate namespace for elements from differentvocabularies.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e203"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;1.&amp;nbsp;Allowing RDF inside the XHTML head section (RELAX NG)&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;element name="head" &lt;br /&gt;         ns="http://www.w3.org/1999/xhtml"&amp;gt;          &lt;br /&gt;  &amp;lt;element name="title" &lt;br /&gt;           ns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;    &amp;lt;text/&amp;gt;&lt;br /&gt;  &amp;lt;/element&amp;gt;&lt;br /&gt;  &amp;lt;interleave&amp;gt;&lt;br /&gt;    ... other XHTML head elements ...&lt;br /&gt;    &amp;lt;optional&amp;gt;&lt;br /&gt;      &amp;lt;element name="RDF" &lt;br /&gt;               ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&amp;gt;&lt;br /&gt;        ...&lt;br /&gt;      &amp;lt;/element&amp;gt;&lt;br /&gt;    &amp;lt;/optional&amp;gt;  &lt;br /&gt;  &amp;lt;/interleave&amp;gt;&lt;br /&gt;&amp;lt;/element&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The previous example is quite straightforward, but it is notreally flexible indeed. Reusing the definition for a differentcombination of vocabularies would be very painful as it would requireus to use the copy and paste technique. The definition can besignificantly improved by modularizing the schema. Having modules foreach vocabulary would allow us to create schemas for various compoundlanguages simply by including the right subset of modules.&lt;br /&gt;Despite the namespace-aware schema language approach is verysimple, it has several drawbacks. Imagine we like to allowa foreign vocabulary in some contexts of XHTML. This is a simple taskfor someone who is familiar with the implementation details of theXHTML schema (knowing the structure of the schema's definition andmodules).  But it is not as straightforward for someone who doesn'thave the right insight.&lt;br /&gt;Moreover, in most cases we cannot simply reuse the existingschemas for vocabularies we like to combine. Standalone languageschemas aren't often well prepared to be combined with other schemas.Usually they don't have the right level of modularity and abstractionwhich is needed for their seamless integration. In addition, they arefrequently written in different schema languages or even in languageswhich aren't namespace-aware at all (for example DTD). This implies,schemas for different vocabularies first need to be converted to thesame namespace-aware schema language and slightly modified before theycan be used as modules of the compound definition. &lt;br /&gt;Such approach would not only require deep knowledge of theparticular schemas and a long implementation time, but it also leadsto maintenance issues. As different languages evolve over time, weneed to keep our modified or converted schemas constantly up-to-date.For complex compound languages this may be an essential problem.&lt;br /&gt;To demonstrate the issues, lets consider the following example.We would like to create a compound document schema for XHTML withembedded SVG and MathML in all block level and inline elements and RDFin the head section. When we decide to use a namespace-aware schemalanguage (for example XML Schema) to achieve that, we run intoproblems. First, we need to convert the official XHTML DTDs into XMLSchema. This needs to be done in a specific way, as we need to haveabstract classes prepared for the head section and block and inlineelements to make them easily extensible through additional modules.Further we can reuse the XML Schema for MathML, but such schema cannotbe used as it is. First, we need to modify it to make it a module ofour parent XHTML schema. The module needs to be further tailored in aspecific way to allow MathML just in the context of the block andinline elements. A similar task needs to be done also for SVG andRDF.&lt;br /&gt;Basically, every time a new vocabulary needs to be incorporatedinto the compound definition, its official schema first needs to beconverted and modified. Moreover, different vocabulary modules needsto be constantly synchronized with new versions of the languages. Thisis an error-prone approach, because the different definitions arebeing duplicated. Another problem arises, when for example SVGshould displace XHTML as the parent language. In such case, differentvocabulary modules cannot be simply reused. On the contrary, they mayneed to be again duplicated and slightly reworked.&lt;br /&gt;To conclude, the namespace-aware schema language concept isapplicable in simple cases, but it is not a solution which can beconsidered for complex scenarios. Reusability of existing schemas isan important requirement which is not satisfied at all within today'snamespace-aware schema languages. Different approach to compounddocument validation is needed to allow schema reusability. Suchapproach has to be independent of the particular schema'simplementation details and the schema languages used.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="nvdl"&gt;&lt;/a&gt;NVDL is the right solution&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;NVDL, which means Namespace-based Validation DispatchingLanguage, is “&lt;span class="quote"&gt;Part 4 of ISO/IEC 19757 DSDL&lt;/span&gt;” (DocumentSchema Definition Languages) international standard. NVDL is a simple“&lt;span class="quote"&gt;meta-schema&lt;/span&gt;” language which allows to control processingand validation of compound documents. &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#fig.nvdl-process" title="Figure 1. NVDL validation process at a glance" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;1, “NVDL validation process at a glance”&lt;/a&gt; demonstrates a particular validationdispatching process decomposed into several phases. An NVDL schemaand a compound document instance shown in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-process" title="Example 2. NVDL validation process" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;2, “NVDL validation process”&lt;/a&gt; are potential participants of such process.&lt;br /&gt;The essence of NVDLis dividing XML document instances into sections each of whichcontains elements or attributes from a single namespace. A section tree is first constructed for every instance (see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-process-sections" title="Example 3. Decomposing sections" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;3, “Decomposing sections”&lt;/a&gt;). Sectionsare further combined or manipulated in various ways to createso called validation candidates.&lt;br /&gt;Manipulation of sections is achieved through rules andtheir corresponding actions defined in an NVDL script. Actionsare executed on a particular section whenever they match a certainrule; usually in case the sections namespace matches the rule'snamespace wildcard.&lt;br /&gt;There are several actions defined in NVDL;e. g. &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;attach&lt;/code&gt; for attaching sections back totheir parent, &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;unwrap&lt;/code&gt; to handle wrappedsections and &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;validate&lt;/code&gt; to send a particular validation fragment to a particular validator.&lt;br /&gt;After executing actions, we usually obtain single namespacevalidation candidates which are further filtered for redundancyinto validation fragments. Such fragments are finally independently send for validation against differentsubschemas&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ftn.d292e256" id="d292e256"&gt;2&lt;/a&gt;]&lt;/sup&gt; (see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-process-validation" title="Example 4. Dispatching validation fragments to validators" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;4, “Dispatching validation fragments to validators”&lt;/a&gt;).&lt;br /&gt;The ability to create single namespace fragments allows us not to careabout namespaces in our subschemas at all.Single namespace schemas are easier to write and what is important alsoeasy to reuse for various different compound languages, wherethe same vocabulary may be used in a different contextor in combination with different vocabularies. Moreover, NVDL is schema language transparent, thus subschemas maybe written in any preferable schema language e. g. RELAX NG, XMLSchema, Schematron or DTD. For detailed information about the NVDL validation dispatchingprocess, refer to [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e546" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;NVDL&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="fig.nvdl-process"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;1.&amp;nbsp;NVDL validation process at a glance&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_63VwuZt4I/AAAAAAAADVk/vwfxleA1phE/s1600/nvdl_process2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_63VwuZt4I/AAAAAAAADVk/vwfxleA1phE/s320/nvdl_process2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="ex.nvdl-process"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;2.&amp;nbsp;NVDL validation process&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;The following example shows an NVDL schema and a compound document instance which relates to &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#fig.nvdl-process" title="Figure 1. NVDL validation process at a glance" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;1, “NVDL validation process at a glance”&lt;/a&gt;. In this case, NS1 represents the XHTML namespace and NS2 stands for the XForms namespace. The following instance is an XHTML document with a simple form for retrieving stock quote information.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;xf:model&amp;gt;&lt;br /&gt;  &amp;lt;xf:instance&amp;gt;&amp;lt;stockquote&amp;gt;&amp;lt;symbol/&amp;gt;&amp;lt;/stockquote&amp;gt;&amp;lt;/xf:instance&amp;gt;&lt;br /&gt;  &amp;lt;xf:submission xml:id="form" method="post"  action="getStockQuote.do"/&amp;gt;&lt;br /&gt;&amp;lt;/xf:model&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;xf:group ref="stockquote"&amp;gt;&lt;br /&gt;&amp;lt;xf:input ref="symbol"&amp;gt;&amp;lt;xf:label&amp;gt;Symbol&amp;lt;/xf:label&amp;gt;&amp;lt;/xf:input&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;xf:submit submission="form"&amp;gt;&amp;lt;xf:label&amp;gt;Get Quote&amp;lt;/xf:label&amp;gt;&amp;lt;/xf:submit&amp;gt;&lt;br /&gt;&amp;lt;/xf:group&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;To achieve behavior consistent with &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#fig.nvdl-process" title="Figure 1. NVDL validation process at a glance" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;1, “NVDL validation process at a glance”&lt;/a&gt;, the following schema is applied to the previous compound document instance. Using such schema, the NVDL dispatcher first sends the root XHTML fragment for validation after filtering any descendant XForms fragments and attaching any descendant XHTML fragments. XForms sections are handled in a similar way by filtering any descendant XHTML. For any XHTML document instance with embedded XForms, the following NVDL schema causes one pure XHTML fragment to be send for validation against &lt;code class="content-filename" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;xhtml.xsd&lt;/code&gt; and one or more pure XForms fragments to be validated using &lt;code class="content-filename" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;xforms.rng&lt;/code&gt;.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"&amp;gt;&lt;br /&gt;&amp;lt;namespace ns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;  &amp;lt;validate schema="xhtml.xsd"&amp;gt;&lt;br /&gt;    &amp;lt;mode&amp;gt;&amp;lt;namespace ns="http://www.w3.org/2002/xforms"&amp;gt;&lt;br /&gt;      &amp;lt;validate schema="xforms.rng"&amp;gt;&lt;br /&gt;        &amp;lt;mode&amp;gt;&amp;lt;namespace ns="http://www.w3.org/2002/xforms"&amp;gt;&amp;lt;attach/&amp;gt;&amp;lt;/namespace&amp;gt;&lt;br /&gt;          &amp;lt;namespace ns="http://www.w3.org/2002/06/xhtml2"&amp;gt;&amp;lt;unwrap/&amp;gt;&amp;lt;/namespace&amp;gt;&lt;br /&gt;        &amp;lt;/mode&amp;gt;&lt;br /&gt;      &amp;lt;/validate&amp;gt;&lt;br /&gt;      &amp;lt;unwrap&amp;gt;&lt;br /&gt;      &amp;lt;mode&amp;gt;&amp;lt;namespace ns="http://www.w3.org/2002/xforms"&amp;gt;&amp;lt;unwrap/&amp;gt;&amp;lt;/namespace&amp;gt;&lt;br /&gt;        &amp;lt;namespace ns="http://www.w3.org/2002/06/xhtml2"&amp;gt;&amp;lt;attach/&amp;gt;&amp;lt;/namespace&amp;gt;&lt;br /&gt;      &amp;lt;/mode&amp;gt;&lt;br /&gt;      &amp;lt;/unwrap&amp;gt;&lt;br /&gt;    &amp;lt;/namespace&amp;gt;&amp;lt;/mode&amp;gt;&lt;br /&gt;  &amp;lt;/validate&amp;gt;&lt;br /&gt;&amp;lt;/namespace&amp;gt;&lt;br /&gt;&amp;lt;/rules&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="ex.nvdl-process-sections"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;3.&amp;nbsp;Decomposing sections&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;The instance shown in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-process" title="Example 2. NVDL validation process" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;2, “NVDL validation process”&lt;/a&gt; is decomposed into the following section tree after applying the NVDL schema from the same example.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;ES1 &amp;lt;html&amp;gt;&amp;lt;head&amp;gt;ref to ES2&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;ref to ES4&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;ES2 &amp;lt;xf:model&amp;gt;...&amp;lt;/xf:model&amp;gt;&lt;br /&gt;&lt;br /&gt;ES3 &amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;ES4 &amp;lt;xf:group ref="stockquote"&amp;gt;&amp;lt;xf:input ref="symbol"&amp;gt;...&amp;lt;/xf:input&amp;gt;&lt;br /&gt;ref to ES3&lt;br /&gt;&amp;lt;xf:submit submission="form"&amp;gt;...&amp;lt;/xf:submit&amp;gt;&amp;lt;/xf:group&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="ex.nvdl-process-validation"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;4.&amp;nbsp;Dispatching validation fragments to validators&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;After executing &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;attach&lt;/code&gt; and &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;unwrap&lt;/code&gt; actions on the section tree shown in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-process-sections" title="Example 3. Decomposing sections" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;3, “Decomposing sections”&lt;/a&gt;, the following resulting fragments are created and send independently for validation. &lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt; -&amp;gt; xhtml.xsd&lt;br /&gt;&lt;br /&gt;&amp;lt;xf:model&amp;gt;...&amp;lt;/xf:model&amp;gt; -&amp;gt; xforms.rng&lt;br /&gt;&lt;br /&gt;&amp;lt;xf:group ref="stockquote"&amp;gt;&amp;lt;xf:input ref="symbol"&amp;gt;...&amp;lt;/xf:input&amp;gt;&lt;br /&gt;&amp;lt;xf:submit submission="form"&amp;gt;...&amp;lt;/xf:submit&amp;gt;&amp;lt;/xf:group&amp;gt; -&amp;gt; xforms.rng&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Namespace-aware schema languages force us to convert all ourschemas to the same schema language. In contrast, when using NVDL, weare free to choose any languages we prefer and we may also combinedifferent schema languages during a single validation process. NVDLdoes not force XML language designers to use mainstream schemalanguages. On the contrary, they are encouraged to choose the schemalanguage which best suits their vocabulary needs. NVDL is alsocompletely isolated from the implementation details of the particularsubschemas. The vocabulary designers can fully focus on the schemaimplementation without even thinking about how can their vocabularypossibly be combined with a different one. NVDL schema designersdo not need any knowledge of the particular subschemaimplementation details. Moreover, they don't even need to understandthe different subschema languages when designing their NVDL scripts.&lt;br /&gt;In the previous section we have seen how difficult it is tocreate a compound definition using a namespace-aware schema language.Lets use NVDL to create the same compound schema: XHTML with embeddedSVG, MathML and RDF. In this case, there is no need for severalexperts to work on that for days. One person can create such NVDLscript in a matter of minutes (see &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-sample" title="Example 5. NVDL schema for XHTML with embedded SVG, MathML and RDF" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;5, “NVDL schema for XHTML with embedded SVG, MathML and RDF”&lt;/a&gt;). The reason is, existing schemas canbe fully reused without making any changes to them.  &lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="ex.nvdl-sample"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;5.&amp;nbsp;NVDL schema for XHTML with embedded SVG, MathML and RDF&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0" startMode="root"&amp;gt;&lt;br /&gt;  &amp;lt;mode name="root"&amp;gt;       &lt;br /&gt;    &amp;lt;namespace ns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;      &amp;lt;validate schema="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;br /&gt;        &amp;lt;context path="head" useMode="head"/&amp;gt;&lt;br /&gt;        &amp;lt;context path="div|li|p...all block level elements" useMode="block_inline"/&amp;gt;&lt;br /&gt;        &amp;lt;context path="a|em|span|...all inline elements" useMode="block_inline"/&amp;gt;&lt;br /&gt;      &amp;lt;/validate&amp;gt;&lt;br /&gt;    &amp;lt;/namespace&amp;gt;&lt;br /&gt;  &amp;lt;/mode&amp;gt;  &lt;br /&gt;  &amp;lt;mode name="block_inline"&amp;gt;&lt;br /&gt;    &amp;lt;namespace ns="http://www.w3.org/2000/svg"&amp;gt;&lt;br /&gt;      &amp;lt;validate schema="http://www.w3.org/TR/2002/WD-SVG11-20020108/SVG.xsd"/&amp;gt;&lt;br /&gt;    &amp;lt;/namespace&amp;gt;&lt;br /&gt;    &amp;lt;namespace ns="http://www.w3.org/1998/Math/MathML"&amp;gt;&lt;br /&gt;      &amp;lt;validate schema="http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd"/&amp;gt;&lt;br /&gt;    &amp;lt;/namespace&amp;gt;&lt;br /&gt;  &amp;lt;/mode&amp;gt;&lt;br /&gt;  &amp;lt;mode namne="head"&amp;gt;&lt;br /&gt;    &amp;lt;namespace ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&amp;gt;&lt;br /&gt;      &amp;lt;validate schema="http://www.w3.org/2000/07/rdf.xsd"&amp;gt;&lt;br /&gt;        &amp;lt;mode&amp;gt;&amp;lt;anyNamespace&amp;gt;&amp;lt;attach/&amp;gt;&amp;lt;/anyNamespace&amp;gt;&amp;lt;/mode&amp;gt;  &lt;br /&gt;      &amp;lt;/validate&amp;gt;&lt;br /&gt;    &amp;lt;/namespace&amp;gt;&lt;br /&gt;  &amp;lt;/mode&amp;gt;&lt;br /&gt;&amp;lt;/rules&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;In the NVDL script in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-sample" title="Example 5. NVDL schema for XHTML with embedded SVG, MathML and RDF" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;5, “NVDL schema for XHTML with embedded SVG, MathML and RDF”&lt;/a&gt;, subschemas are referenced directly at their original locations usingURLs. The script tells the NVDL engine that the only acceptable parentlanguage is XHTML and other vocabularies are forbidden in thatcontext. Plain XHTML is extracted from the validated document and sendfor validation against the official DTDs. RDF sections may only occurin the context of the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt; element. Any foreignvocabulary contained inside the RDF fragment is attached to it beforebeing send for validation. SVG and MathML fragments are allowed onlyin block and inline elements. Any other vocabulary in any othercontext of the document is rejected.&lt;br /&gt;This simple example demonstrates the power of NVDL. Modifyingthe NVDL script to allow any other vocabulary in some context is asimple and straightforward task. In addition, the script contains onlythe required information about the compound language. Anything relatedto the grammar of the particular vocabularies is encapsulated in thesubschemas where it really belongs. This makes NVDL schemas not onlyeasy to design, but also easy to read and understand. &lt;br /&gt;Note that &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.nvdl-sample" title="Example 5. NVDL schema for XHTML with embedded SVG, MathML and RDF" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;5, “NVDL schema for XHTML with embedded SVG, MathML and RDF”&lt;/a&gt; demonstrates the use ofan NVDL &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;context&lt;/code&gt; construct which allows to apply a specific handling to sections in a given path within their parent section.Several paths separated by &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;|&lt;/code&gt; may be used within one &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;context&lt;/code&gt; condition. Paths used in the example are relative, but absolute paths may be used as well. For example an HTML head context can beaddressed also using the &lt;code class="content-filename" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;/html/head&lt;/code&gt; path.  &lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="jnvdl"&gt;&lt;/a&gt;JNVDL&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="http://sourceforge.net/projects/jnvdl/" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;JNVDL&lt;/a&gt; isa Java-based implementation of the [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e546" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;NVDL&lt;/span&gt;&lt;/a&gt;]specification and it was developed by our team. JNVDL uses the newJAXP validation API, which has been introduced in Java 5. This isa standard way to invoke validation processes and it makes JNVDL easyto use for the end user as well as simply reusable in otherapplications.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e366"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;6.&amp;nbsp;Invoking NVDL validation using the JAXP validation API&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;Schema schema = &lt;br /&gt;  SchemaFactory.newInstance(&lt;br /&gt;    "http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0")&lt;br /&gt;      .newSchema(new File("schema.nvdl"));&lt;br /&gt;&lt;br /&gt;schema.newValidator().validate("instance.xml");&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The validation API is also used by JNVDL to invoke furthervalidation processes for particular subschemas. This makes JNVDLtransparent to different schema language validator implementations.Enabling JNVDL to validate against a new schema language is just thematter of adding the appropriate validator's jar library on the Javaclasspath. No changes to the JNVDL code are required.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e373"&gt;&lt;/a&gt;Implementation issues&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;One of the issues the JNVDL implementation faced is related tothe fact that validators tend to report error locations using line andcolumn numbers. When parsing the validated instance and turning itinto validation fragments, the original position of elements andattributes is inevitably lost. There are two reasons for that. First,today parsers are lacking round-tripping support, thus somewhitespaces which are considered to be irrelevant aren't reported andpreserved. Second, different validation fragments are taken fromdifferent places within the original document. As they are send tovalidators separately, the original position is lost.&lt;br /&gt;Such behavior may confuse users as the error line numbersreported by the particular validators aren't related to the originaldocument but to the particular fragment context. To interpret theinformation correctly, users would need to deduce the line numbersfrom the original position of the validation fragments created byJNVDL.&lt;br /&gt;To overcome those difficulties, JNVDL provides a proprietaryround-tripping extension. Such extension preserves whitespaces fromthe original document and before validation fragments are being sendto the particular validators, they are modified so that elements andattributes occur on the same lines as in the original document.Further, if an XML fragment is extracted from the middle of thedocument, JNVDL adds the appropriate number of empty lines before itto keep the fragment at the same location.&lt;br /&gt;The problem of irrelevance of some whitespaces within XMLdocuments makes the use of line numbers to locate elements andattribute problematic or even error-prone. Validation API designersshould consider using a different mechanism to locate errors. Forexample XPath is a good candidate, as it is whitespace independent andprecise.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="versioning"&gt;&lt;/a&gt;Impact on a Web architecture&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;It is evident that compound documents are used more and moreoften. At this time NVDL is the best available technology forvalidation of compound documents. Still NVDL has some limitationswhich make it not very usable for some document types that are widelyused on the Web. On the other hand the most popular container format forcompound documents—XHTML—is not designed with this usage scenario inmind and breaks many principles of a Web architecture.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e389"&gt;&lt;/a&gt;Namespace is not a document type&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;It is a quite common misconception that for each namespace there isa single schema defined somewhere. This assumption might hold for somesimpler specialized XML based languages, but for many languages usedon the Web, namespace works just as a basic semanticidentification.&lt;br /&gt;Very often, there are multiple different variants of vocabularyin one particular namespace. These vocabularies could be subsets ofthe “&lt;span class="quote"&gt;base&lt;/span&gt;” language—for example, this is a case of XHTML1.0 Transitional and its derivates like XHTML 1.0 Strict, XHTML Basicor XHTML Print. The second case is newer version of vocabulary whichdoes not change meaning of original elements so there is no need tochange namespace. Both XSLT&amp;nbsp;1.0 and XSLT&amp;nbsp;2.0 share the same namespace,but XSLT&amp;nbsp;2.0 defines dozen of new elements and attributes, it evenchanges content model of some elements. Similar situation is true alsofor XHTML—XHTML 1.1 defines several new elements for Rubyannotations.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e399"&gt;&lt;/a&gt;Versioning namespaces&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Several different approaches for recognizing document types ina single namespace are in a common use. One of the easiest is usage ofdedicated attribute for holding version information; for example in case of XSLT.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e404"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;7.&amp;nbsp;Version information inside XSLT&amp;nbsp;2.0 stylesheet&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;xsl:stylesheet &lt;br /&gt;  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&lt;br /&gt;  version="2.0"&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;This is almost ideal way of conveying versioninformation. Attribute value can be easily accessed in almost allprocessing tools. What is even more important, you can embed XSLT intoother XML vocabulary and you are still able to identify a version ofXSLT used by using the &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;version&lt;/code&gt;attribute.&lt;br /&gt;The only problem is that XSLT allows versioning attribute to occur onlyon a top element of a stylesheet. So you are unable to extract for exampleone template from stylesheet and add versioning information to thistemplate.&lt;br /&gt;XHTML uses legacy way of specifying versioning information whichis depending on presence of a document type declaration (!DOCTYPE) atthe start of the document.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e418"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;8.&amp;nbsp;Version information in XHTML document&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;!DOCTYPE html &lt;br /&gt;  PUBLIC "-//W3C//DTD XHTML-Print 1.0//EN"&lt;br /&gt;  "http://www.w3.org/MarkUp/DTD/xhtml-print10.dtd"&amp;gt;&lt;br /&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Strictly speaking, document type declaration is not versionindication, it is just reference to DTD which can be used forvalidation and definition of entities used. But public or systemidentifier could be used as a version identifier albeit quite long andverbose.&lt;br /&gt;Unfortunately document type declaration can occur only at thebeginning of an XML document. It can not be embedded in the middle of thedocument—this disqualifies it from being used in the Web of compounddocuments. This for example means that you can not embedded an XHTML pageinto SOAP message and identify version of XHTML used.&lt;br /&gt;Moreover, current specifications of several XHTML flavors (forexample XHTML Basic and XHTML Print) make public identifier optionaland allows specification of a private system identifier as long as itpoints to a copy of original DTD. This means that in order to reliablydetect version of XHTML used, you have to download DTD, normalizeline-end characters inside it and then compare it to one of originalDTDs provided by W3C as a part of respective specification. It isevident that such process is overkill. Moreover, requests for downloadof private copy of DTD could be misused as attack against the Webagent—this DTD could be very long or it could use a big amount of entitydeclarations to congest the XML parser.&lt;br /&gt;There is also not very well known feature of XHTML that could beused for specifying version information instead of document typedeclaration. It is possible to use the &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;profile&lt;/code&gt; attribute on the&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt; element. Profile identifies particular profile(version, subset) of the language used and it has form of URI.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e438"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;9.&amp;nbsp;More robust way of labeling document as XHTML Print&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;  &amp;lt;head &lt;br /&gt;    profile="http://www.w3.org/Markup/Profile/Print"&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;  &amp;lt;/head&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Again, &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;profile&lt;/code&gt; attribute isnot a perfect solution—it can be specified only on the&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt; element and thus can not be used forspecifying flavor of XHTML used for just a small fragment of XHTMLcode.&lt;br /&gt;Previous examples show a very sad conclusion that the currentstate of XML vocabularies and their specifications were not designedin order to make it possible to fully exploit possibilities ofcompound documents. We think that W3C should extend current Webarchitecture [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e590" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;WEBARCH&lt;/span&gt;&lt;/a&gt;] and update olderspecifications to support robust and flexible way of attaching versioninformation to arbitrary fragments of XML vocabularies. It seems thatallowing &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;version&lt;/code&gt; or similarattribute on all elements which can be used as root elements of XMLfragments is a simple and sufficient solution. At the same time,a document type declaration should be made an optional part ofa conforming document.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e459"&gt;&lt;/a&gt;Extending NVDL to support versioning&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;In the previous text we explained why we think that namespaceitself is not sufficient for a document type identification. As NVDLvalidation dispatching is based solely on namespaces, we have a problemhere—the current version of NVDL is not able to recognize differentflavors of XHTML or XSLT and route validation to appropriate versionsof the schema. To overcome this limitation, we designed few extensions tothe NVDL language. Their utility is being evaluated using JNVDL (ourimplementation of the NVDL standard).&lt;br /&gt;Our extensions allow better control over the dispatchingprocess. Validations candidate (usually XML fragment from a singlenamespace) is being validated only if corresponding rule in NVDLscript matches both namespace and additional condition. This conditioncan be expressed in XPath language. &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.jnvdl-xpath" title="Example 10. Validation dispatching based on XPath expression" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;10, “Validation dispatching based on XPath expression”&lt;/a&gt;shows NVDL script which can differentiate between XSLT&amp;nbsp;1.0 andXSLT&amp;nbsp;2.0 and use the correct schema for validation.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="ex.jnvdl-xpath"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;10.&amp;nbsp;Validation dispatching based on XPath expression&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"&lt;br /&gt;       xmlns:jnvdl="http://jnvdl.sf.net"&amp;gt;&lt;br /&gt;  &amp;lt;namespace ns="http://www.w3.org/1999/XSL/Transform" &lt;br /&gt;             jnvdl:useWhen="@version = '1.0'"&amp;gt;&lt;br /&gt;    &amp;lt;validate schema="xslt1.xsd"/&amp;gt;&lt;br /&gt;  &amp;lt;/namespace&amp;gt;&lt;br /&gt;  &amp;lt;namespace ns="http://www.w3.org/1999/XSL/Transform" &lt;br /&gt;             jnvdl:useWhen="@version = '2.0'"&amp;gt;&lt;br /&gt;    &amp;lt;validate schema="xslt2.rng"/&amp;gt;&lt;br /&gt;  &amp;lt;/namespace&amp;gt;&lt;br /&gt;&amp;lt;/rules&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The appropriate rule in an NVDL script is used for dispatching onlywhen expression in the &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;useWhen&lt;/code&gt;attribute is true. Context for XPath evaluation corresponds to the elementsection to be dispatched. For attribute sections, dummy element withattached attributes is expected.&lt;br /&gt;Although we previously stated that document type declaration isnot a robust way for specifying version information, it is worth tosupport this way for legacy documents. The past practice was todifferentiate document types using system and public identifier. JNVDLthus supports also additional parameters &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;useWhenPublicId&lt;/code&gt;, &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;useWhenSystemId&lt;/code&gt;, &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;useWhenPublicIdRegex&lt;/code&gt; and &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;useWhenSystemIdRegex&lt;/code&gt; to control when aparticular rule will be used for dispatching based on content ofsystem or public identifiers. If there is more then one“&lt;span class="quote"&gt;useWhen…&lt;/span&gt;” parameter on a single rule, it is sufficientif just one of them matches. &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#ex.jnvdl-xhtml" title="Example 11. Extended NVDL script which handles various flavors of XHTML" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;11, “Extended NVDL script which handles various flavors of XHTML”&lt;/a&gt; shows how to use these JNVDL extensions forhandling various kinds of XHTML in a single NVDL script. &lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="ex.jnvdl-xhtml"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;11.&amp;nbsp;Extended NVDL script which handles various flavors of XHTML&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"&lt;br /&gt;       xmlns:jnvdl="http://jnvdl.sf.net"&lt;br /&gt;       xmlns:html="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;  &amp;lt;namespace ns="http://www.w3.org/1999/xhtml" &lt;br /&gt;             jnvdl:useWhenPublicId="-//W3C//DTD XHTML 1.0 Strict//EN"&lt;br /&gt;             jnvdl:useWhenSystemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&amp;gt;&lt;br /&gt;    &amp;lt;validate schema="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/&amp;gt;&lt;br /&gt;  &amp;lt;/namespace&amp;gt;&lt;br /&gt;  &amp;lt;namespace ns="http://www.w3.org/1999/xhtml" &lt;br /&gt;             jnvdl:useWhenPublicId="-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;br /&gt;             jnvdl:useWhenSystemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;br /&gt;    &amp;lt;validate schema="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/&amp;gt;&lt;br /&gt;  &amp;lt;/namespace&amp;gt;&lt;br /&gt;  &amp;lt;namespace ns="http://www.w3.org/1999/xhtml" &lt;br /&gt;             jnvdl:useWhenPublicId="-//W3C//DTD XHTML-Print 1.0//EN"&lt;br /&gt;             jnvdl:useWhenSystemId="http://www.w3.org/MarkUp/DTD/xhtml-print10.dtd"&lt;br /&gt;             jnvdl:useWhen="contains(concat(' ', normalize-space(html:html/html:head/@profile), ' '), &lt;br /&gt;                                      ' http://www.w3.org/Markup/Profile/Print ')"&amp;gt;&lt;br /&gt;    &amp;lt;validate schema="xhtml-print-1.rng"/&amp;gt;&lt;br /&gt;  &amp;lt;/namespace&amp;gt;&lt;br /&gt;  &amp;lt;!-- Unrecognized flavors of XHTML are validated as XHTML 1.0 Transitional --&amp;gt;&lt;br /&gt;  &amp;lt;namespace ns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;    &amp;lt;validate schema="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/&amp;gt;&lt;br /&gt;  &amp;lt;/namespace&amp;gt;&lt;br /&gt;&amp;lt;/rules&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;We think that without extensions similar to what we propose,usage of NVDL is somehow limited when considering the real Web compound documents inuse. On the other hand, only XPath enabled matching (&lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;useWhen&lt;/code&gt;) could be potentially added intoa future revision of NVDL. Matching done on system and publicidentifiers needs information, which is not available in the NVDL datamodel. JNVDL is thus using an augmented data model to support thoseextensions.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="related-work"&gt;&lt;/a&gt;Related work&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;NVDL could be used not only for validation, but also as a genericmechanism for associating schemas to XML documents. This feature isnecessary in many scenarios, including XML editors or loosely coupledinterfaces for accepting incoming XML messages.&lt;br /&gt;NVDL is an international standard and builds on many precedingtechnologies. Some XML editors, for example nXML mode for Emacs andoXygen, use similar approach for association of schemas for documentbeing edited. But as far as we know, none of those systems supportsusage of full XPath to manage associations. In this regard our NVDLimplementation offers unique functionality which we believe will beincorporated directly into NVDL standard in a future.&lt;br /&gt;Currently there are two other NVDL implementations—&lt;a href="http://www.oxygenxml.com/onvdl.html" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;oNVDL&lt;/a&gt; and &lt;a href="http://monkey.workarea.jp/lb/archive/2005/3-12.html" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;enovdl&lt;/a&gt;. Advantagesof our implementation include seamless integration with Java XML APIsand extensions for working with multiple different schemas for thesame namespace.&lt;br /&gt;Our implementation holds all validation candidates in memoryin a tree representation. This allows us to do fancy things likeevaluating full XPath before dispatching takes place. oNVDL usesstreaming approach which is more memory efficient and can be used forprocessing of a very large datasets. But it is impossible to supportfull XPath in a streaming mode. &lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="future-work"&gt;&lt;/a&gt;Future work&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;One of the future plans for JNVDL is to incorporate it into theRelaxed Web document validation project, see [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e602" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;RLX&lt;/span&gt;&lt;/a&gt;].Relaxed consists of comprehensive HTML 4.01/XHTML 1.0 schemas and avalidation framework. The schemas were created using RELAX NG withembedded Schematron rules. This combination of languages is verypowerful. It allows to express more constrains than the official W3CDTD-based schemas. Relaxed validates also some of the WCAG 1.0constrains and it has a compound documents validation support. Usersmay choose to allow foreign namespaces inside their documents or toban them completely. They may also validate against a set of predefinedcompound schemas e. g. XHTML+SVG, XHTML+MathML etc.&lt;br /&gt;In terms of compound documents, the Relaxed project is limitedto RELAX NG namespace support. As described previously, this makes itdifficult or even time consuming to create compound document schemas.To overcome those difficulties, the new version of Relaxed, which iscurrently being developed, will use JNVDL as the core validationengine. Such step will make NVDL validation publicly accessiblethrough a Web based interface.&lt;br /&gt;Moreover, JNVDL will help to create and maintain new compounddocument schemas easily. Part of the future work is to enrich thecurrent Relaxed schema repository with NVDL scripts for differentcombinations of the standard and widely used vocabularies, especiallythose intended to be used in the Web environment.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="conclusions"&gt;&lt;/a&gt;Conclusions&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;This article has shown that validation of compound documents is besthandled using the NVDL validation language, which has many advantages overother similar approaches (e. g. namespace support in Relax NG or XML Schema).We disclosed a problem of having different versions of document type in asingle namespace and we have shown how to fix this problem by extending NVDLin our implementation called JNVDL. We will use the acquired knowledge fromdeveloping JNVDL and using NVDL when building new version of the &lt;a href="http://relaxed.vse.cz/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;Relaxed validator&lt;/a&gt;.&lt;/div&gt;&lt;div class="content-bibliography"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="biblio"&gt;&lt;/a&gt;Bibliography&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e546"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;NVDL&lt;/abbr&gt;] &lt;span class="content-title"&gt;Document Schema Definition Languages (DSDL) — Part 4:Namespace-based Validation Dispatching Language — NVDL&lt;/span&gt;.ISO/IEC 19757-4. 2006. &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c038615_ISO_IEC_19757-4_2006%28E%29.zip" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://standards.iso.org/ittf/PubliclyAvailableStandards/c038615_ISO_IEC_19757-4_2006(E).zip&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e558"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;XH&lt;/abbr&gt;] Birkbeck, M: &lt;span class="content-title"&gt;xH: The new language you alreadyknow&lt;/span&gt;. Presented at WWW 2006 conference, Edinburgh.&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e566"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;XML&lt;/abbr&gt;]     Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., Yergeau, F.: &lt;span class="content-title"&gt;Extensible Markup Language (XML) 1.0 (Fourth Edition)&lt;/span&gt;.W3C, 2006.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/2006/REC-xml-20060816" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/2006/REC-xml-20060816&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e578"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;NS&lt;/abbr&gt;]     Bray, T., Hollander, D., Layman, A., Tobin, R.: &lt;span class="content-title"&gt;Namespaces in XML 1.0 (Second Edition)&lt;/span&gt;.W3C, 2006.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/REC-xml-names" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/REC-xml-names&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e590"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;WEBARCH&lt;/abbr&gt;] Walsh, N., Jacobs. I: &lt;span class="content-title"&gt;Architecture of the World Wide Web,Volume One&lt;/span&gt;. W3C, 2004. &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/webarch/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/webarch/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e602"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;RLX&lt;/abbr&gt;] Kosek, J., Nálevka, P.: &lt;span class="content-title"&gt;Relaxed—on the Way Towards True Validation of Compound Documents&lt;/span&gt;.In: WWW 2006 Proceedings. WWW 2006. May 23–26, 2006. Edinburgh, Scotland.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www2006.org/programme/files/pdf/4508.pdf" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www2006.org/programme/files/pdf/4508.pdf&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e614"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;HTML4&lt;/abbr&gt;]     Ragget, D., Le Hors, A., Jacobs, I.: &lt;span class="content-title"&gt;HTML 4.01 Specification&lt;/span&gt;.W3C, 1999.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/1999/REC-html401-19991224/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/1999/REC-html401-19991224/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e626"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;XHTML1&lt;/abbr&gt;] &lt;span class="content-title"&gt;XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)&lt;/span&gt;.W3C, 2002.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/2002/REC-xhtml1-20020801/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/2002/REC-xhtml1-20020801/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e638"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;XMLSCH-ST&lt;/abbr&gt;] Thompson, H.S., Beech, D., Maloney, M., Mendelsohn, N.: &lt;span class="content-title"&gt;XML Schema Part 1: Structures Second Edition&lt;/span&gt;.W3C, 2004.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e650"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;XMLSCH-DT&lt;/abbr&gt;] Biron, P., Malhotra, A.: &lt;span class="content-title"&gt;XML Schema Part 2: Datatypes Second Edition&lt;/span&gt;.W3C, 2004.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e662"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;RNG&lt;/abbr&gt;] Clark, J., Murata, M.: &lt;span class="content-title"&gt;RELAX NG Specification&lt;/span&gt;.OASIS Committee Specification, 2001.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.relaxng.org/spec-20011203.html" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.relaxng.org/spec-20011203.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e675"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;XHTMLMOD&lt;/abbr&gt;] Altheim, M., McCarron, S., Boumphrey, F., Dooley, S., Schnitzenbaumer, S., Wugofski, T.: &lt;span class="content-title"&gt;Modularization of XHTML™&lt;/span&gt;.W3C, 2001.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e687"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;RDF&lt;/abbr&gt;] Beckett, D.: &lt;span class="content-title"&gt;RDF/XML Syntax Specification (Revised)&lt;/span&gt;.W3C, 2004.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/rdf-syntax-grammar" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/rdf-syntax-grammar&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e699"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;SVG&lt;/abbr&gt;] Ferraiolo, J., Fujisawa, S., Jackson, J.: &lt;span class="content-title"&gt;Scalable Vector Graphics (SVG) 1.1 Specification&lt;/span&gt;.W3C, 2003.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/SVG11" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/SVG11&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119" id="d292e711"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;MTHML&lt;/abbr&gt;] Carlisle, D., Ion, P., Miner, R., Poppelier, N.: &lt;span class="content-title"&gt;Mathematical Markup Language (MathML) Version 2.0 (Second Edition)&lt;/span&gt;.W3C, 2003.&lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.w3.org/TR/MathML2" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.w3.org/TR/MathML2&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="footnotes"&gt;&lt;br /&gt;&lt;hr align="left" width="100" /&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e172" id="ftn.d292e172"&gt;1&lt;/a&gt;] &lt;/sup&gt;Compound language is a term used within thistext to describe a language composed of two or more different XMLvocabularies. Such a composition is considered to be a languageitself, as it has its own syntax and semantics in addition to thesyntax and semantics of the particularvocabularies.&lt;/div&gt;&lt;div class="content-footnote"&gt;&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=5763138203519906119#d292e256" id="ftn.d292e256"&gt;2&lt;/a&gt;] &lt;/sup&gt;Subschema is defined in the NVDLspecification as a schema referenced by the NVDLscript.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-5763138203519906119?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/5763138203519906119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/nvdl-breath-of-fresh-air-for-compound.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/5763138203519906119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/5763138203519906119'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/nvdl-breath-of-fresh-air-for-compound.html' title='NVDL — a Breath of Fresh Air for Compound Document Validation (XTech2007)'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_rwM3HrdhDr8/S_63VwuZt4I/AAAAAAAADVk/vwfxleA1phE/s72-c/nvdl_process2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-2218231519130775073</id><published>2010-05-27T11:14:00.001-07:00</published><updated>2010-05-27T11:33:43.377-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>New version of NVDL available</title><content type='html'>&lt;div class="content-article" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;/div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;div class="content-side" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;/div&gt;&lt;b&gt;JNVDL 20071112&amp;nbsp;&lt;/b&gt;..download latest version &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=164464" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;here&lt;/a&gt;.  &lt;br /&gt;&lt;div align="center" class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_62wyJ7bbI/AAAAAAAADVc/SKUpOIPiz7I/s1600/jnvdl-logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_62wyJ7bbI/AAAAAAAADVc/SKUpOIPiz7I/s320/jnvdl-logo.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;/div&gt;I have created a new version of the JNVDL suite for compound document validation. The new version reflects the latest Murata Makoto's chnages in the NVDL specification including big changes in attribute section handling.&lt;br /&gt;A major usability enhancement was validation debug outputs. Now the outputs correspond to how examples are shown in the specification. You will find in he output only what you are really interested in. Using the &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;-d&lt;/code&gt; for validation the XFroms example from the specification shows the following output. You see exactly what JNVDL did, all the element and attribute sections it has created, interpretations it assigned to each section and finally fragments and what schema has been used to validate them. This may significatly help with debugging of your validation but also of JNVDL.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=2218231519130775073" id="d293e26"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;1.&amp;nbsp;Example JNVDL debug output&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;petr@alfa-pn-3:~/dev/project/nvdl/impl/dist$ ./jnvdl.sh -s ./example/primary/spec-xf-html.nvdl.xml -d ./example/primary/spec-xf-html.instance.xml&lt;br /&gt;Round tripping: false&lt;br /&gt;Keep line numbers: false&lt;br /&gt;Stage 1 - Decomposing Sections -&lt;br /&gt;        &amp;lt;{http://www.w3.org/2002/06/xhtml2} ES1(table)&amp;gt;&lt;br /&gt;                &amp;lt;{http://www.w3.org/2002/xforms} ES2(repeat)&amp;gt;&lt;br /&gt;                  AS{}(id nodeset )&lt;br /&gt;                        &amp;lt;{http://www.w3.org/2002/06/xhtml2} ES3(tr)&amp;gt;&lt;br /&gt;                                &amp;lt;{http://www.w3.org/2002/xforms} ES4(input)&amp;gt;&lt;br /&gt;                                  AS{}(ref )&lt;br /&gt;                                        &amp;lt;{http://www.w3.org/2002/06/xhtml2} ES5(p)&amp;gt;&lt;br /&gt;                                                &amp;lt;{http://www.w3.org/2002/xforms} ES6(label)&amp;gt;&lt;br /&gt;                                                &amp;lt;/ES6(label)&amp;gt;&lt;br /&gt;                                        &amp;lt;/ES5(p)&amp;gt;&lt;br /&gt;                                &amp;lt;/ES4(input)&amp;gt;&lt;br /&gt;                        &amp;lt;/ES3(tr)&amp;gt;&lt;br /&gt;                &amp;lt;/ES2(repeat)&amp;gt;&lt;br /&gt;        &amp;lt;/ES1(table)&amp;gt;&lt;br /&gt;&lt;br /&gt;Stage 2 - Building Interpretations -&lt;br /&gt;&lt;br /&gt;Interpretation 1&lt;br /&gt;&lt;br /&gt;                AS{}(ref )&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;                ES1(table)&lt;br /&gt;                                 [VALIDATE against '../secondary/xhtml2/xhtml2.rng']&lt;br /&gt;                ES4(input)&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;                AS{}(id nodeset )&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;                ES2(repeat)&lt;br /&gt;                                 [VALIDATE against '../secondary/xforms/xforms.rng']&lt;br /&gt;                ES5(p)&lt;br /&gt;                                 [UNWRAP]&lt;br /&gt;                ES6(label)&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;                ES3(tr)&lt;br /&gt;                                 [UNWRAP]&lt;br /&gt;&lt;br /&gt;Interpretation 2&lt;br /&gt;&lt;br /&gt;                AS{}(ref )&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;                ES1(table)&lt;br /&gt;                                 [VALIDATE against '../secondary/xhtml2/xhtml2.rng']&lt;br /&gt;                ES4(input)&lt;br /&gt;                                 [UNWRAP]&lt;br /&gt;                AS{}(id nodeset )&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;                ES2(repeat)&lt;br /&gt;                                 [UNWRAP]&lt;br /&gt;                ES5(p)&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;                ES6(label)&lt;br /&gt;                                 [UNWRAP]&lt;br /&gt;                ES3(tr)&lt;br /&gt;                                 [ATTACH]&lt;br /&gt;&lt;br /&gt;Stage 3 and 4 - Combining Sections and Filtering -&lt;br /&gt;        Validation candidate overwritten by a larger fragment:&lt;br /&gt; [1 &amp;lt; 4]&amp;lt;table xmlns="http://www.w3.org/2002/06/xhtml2" xmlns:xforms="http://www.w3.org/2002/xforms"&amp;gt;  &amp;lt;tr&amp;gt;  &amp;lt;td&amp;gt;  &amp;lt;p&amp;gt;    &amp;lt;/p&amp;gt;  &amp;lt;/td&amp;gt;  &amp;lt;/tr&amp;gt;  &amp;lt;/table&amp;gt;&lt;br /&gt;&lt;br /&gt;Stage 5 - Validation -&lt;br /&gt;&lt;br /&gt;        Schema 'file:/home/petr/dev/project/nvdl/impl/dist/./example/primary/../secondary/xhtml2/xhtml2.rng'&lt;br /&gt;        Namespace 'http://relaxng.org/ns/structure/1.0'&lt;br /&gt;        Fragment: '&amp;lt;table xmlns="http://www.w3.org/2002/06/xhtml2" xmlns:xforms="http://www.w3.org/2002/xforms"&amp;gt;  &amp;lt;tr&amp;gt;  &amp;lt;td&amp;gt;  &amp;lt;p&amp;gt;    &amp;lt;/p&amp;gt;  &amp;lt;/td&amp;gt;  &amp;lt;/tr&amp;gt;  &amp;lt;/table&amp;gt;'&lt;br /&gt;ERROR: line 1 column 94, tag name "table" is not allowed. Possible tag names are: &amp;lt;html&amp;gt;&lt;br /&gt;&lt;br /&gt;        Schema 'file:/home/petr/dev/project/nvdl/impl/dist/./example/primary/../secondary/xforms/xforms.rng'&lt;br /&gt;        Namespace 'http://relaxng.org/ns/structure/1.0'&lt;br /&gt;        Fragment: '&amp;lt;xforms:repeat xmlns:xforms="http://www.w3.org/2002/xforms" id="lineset" nodeset="/my:lines/my:line"&amp;gt;  &amp;lt;xforms:input ref="my:price"&amp;gt;  &amp;lt;xforms:label&amp;gt;Line Item&amp;lt;/xforms:label&amp;gt;  &amp;lt;/xforms:input&amp;gt;  &amp;lt;/xforms:repeat&amp;gt;'&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br class="example-break" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-2218231519130775073?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/2218231519130775073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/new-version-of-nvdl-available.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/2218231519130775073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/2218231519130775073'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/new-version-of-nvdl-available.html' title='New version of NVDL available'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_rwM3HrdhDr8/S_62wyJ7bbI/AAAAAAAADVc/SKUpOIPiz7I/s72-c/jnvdl-logo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-6734189080358872455</id><published>2010-05-27T11:10:00.000-07:00</published><updated>2010-05-27T11:33:34.192-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Grammar vs. Rules</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="content-article" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="subtitle"&gt;&lt;i&gt;Diagnostics in XML document validation&lt;/i&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-author"&gt;&lt;h3 class="content-author"&gt;&lt;span class="firstname"&gt;Petr&lt;/span&gt; &lt;span class="surname"&gt;Nálevka&lt;/span&gt;&lt;/h3&gt;&lt;div class="content-affiliation"&gt;&lt;span class="content-orgname"&gt;University of Economics, Prague&lt;/span&gt; &lt;span class="content-orgdiv"&gt;Department of Information and Knowledge Engineering&lt;/span&gt;&lt;br /&gt;&lt;div class="content-address"&gt;&lt;span class="street"&gt;W.&amp;nbsp;Churchill&amp;nbsp;Sq.&amp;nbsp;4&lt;/span&gt;&lt;br /&gt;&lt;span class="city"&gt;130&amp;nbsp;67&amp;nbsp;Praha&amp;nbsp;3&lt;/span&gt;&lt;br /&gt;&lt;span class="country"&gt;Czech&amp;nbsp;Republic&lt;/span&gt;&lt;br /&gt;&lt;code class="content-email" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;a href="mailto:petr@nalevka.com"&gt;petr@nalevka.com&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-abstract"&gt;&lt;div class="title"&gt;&lt;b&gt;Abstract&lt;/b&gt;&lt;/div&gt;Regular grammars has been used over decades for different formal language validation tasks because of their        relative easiness of expression but more important because of their low computing expenses.        Validation using regular        grammars is commonly used also for XML document validation. In this case human understandable grammar        definitions        are converted into regular expressions which are evaluated against the input document. This approach is fast,        straightforward but it lacks good diagnostics. It is hard for the validator engine to track grammar errors back        to the information domain and provide some useful error messages understandable for the author.      &lt;br /&gt;An alternative approach tends to be rule-based validation which is closely related to the modelled information        domain. Rule-based approach gives very good diagnostics but it is more complicated to express simple        parent-child relationships as in grammar-based languages. An interesting way how to gain advantages        of both approaches is to support conversion from grammar-based schemes into rule-based schemes.      &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;div class="toc"&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#intro"&gt;Introduction&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e108"&gt;Validation with Grammar&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e141"&gt;Grammar-based XML Validation&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e146"&gt;Hedge&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e228"&gt;Regular Hedge Grammar&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e350"&gt;Automata-based Validation&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e543"&gt;Grammar and Diagnostics&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e747"&gt;Using Rules&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e777"&gt;Schematron&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e870"&gt;Expressiveness&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e898"&gt;From Grammar to Rules&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#conclusions"&gt;Conclusions&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="bibliography"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#biblio"&gt;Bibliography&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="intro"&gt;&lt;/a&gt;Introduction&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Regular grammar is a formal grammar which is defined by a set of terminal symbols, a set of non-terminals,      and a set of production rules.    &lt;br /&gt;Production rules need to have the following form.&lt;br /&gt;&lt;div class="content-orderedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;Regular grammar production rules&lt;/b&gt;&lt;/div&gt;&lt;ol type="1"&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;          →&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;x&lt;/code&gt;; where          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;          is a non-terminal and          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;x&lt;/code&gt;          is a terminal symbol        &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;          →&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;xY&lt;/code&gt;; where          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;          and          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Y&lt;/code&gt;          is a non-terminal and          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;x&lt;/code&gt;          is a terminal symbol.        &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;          →&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ε&lt;/code&gt;; where          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;          is a non-terminal and          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ε&lt;/code&gt;          is an empty word.        &lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;The previous is also known as right regular grammar. For a left regular grammar the second production rule      takes the form of      &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;X&lt;/code&gt;      →&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Yx&lt;/code&gt;.    &lt;br /&gt;Regular grammar describes all regular languages. They are in a sense equivalent to the finite state automaton.      Form every regular grammar a FSA may be constructed. For each regular language a FSA can be constructed which      accepts      all words from this language but rejects all other words. A FSA is an algorithmic approach how to decide whether a      particular language is generated by a particular regular grammar.    &lt;br /&gt;Regular languages may also be described by regular expressions. This task is information common practice      in information technologies.      There is an algorithmic way to create a FSA from a regular expression and thus a way how to automatically      decide whether a word belongs into a regular language or not.    &lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e108"&gt;&lt;/a&gt;Validation with Grammar&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Regular language theory is often used for validation of whether a string (a program or a document) matches      a regular grammar. This is a typical task which is done during compilation of a computer program where the      compiler checks whether the program has correct syntax and can be compiled. Another example is validation of an      XML document against a schema. An XML schema may be converted into a regular grammar and then decided whether      a document is generated by that particular grammar or not.    &lt;br /&gt;Keeping validation algorithm regular grammar-based is convenient in terms of computational complexity. For      example      regular expressions may be evaluated in a linear time by converting them into deterministic finite state automaton      (DFSA).      For any input word      &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;N&lt;/code&gt;      of length      &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;      and a regular expression      &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;R&lt;/code&gt;      of the length&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;m&lt;/code&gt;;      &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;N&lt;/code&gt;      may be matched against      &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;R&lt;/code&gt;      in the time      &lt;span class="content-mathphrase"&gt;O(n+2&lt;sup xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;m&lt;/sup&gt;)        &lt;/span&gt;      .    &lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e141"&gt;&lt;/a&gt;Grammar-based XML Validation&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;One of the concepts for XML document validation based on regular grammars is regular hedge grammar. In      general, hedge is a sequence of trees. In the XML terminology, we would call them elements. Basically an XML      document is an example of a hedge.    &lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e146"&gt;&lt;/a&gt;Hedge&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;Hedge over a finite set of symbols          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;S&lt;/code&gt;          and variables          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;V&lt;/code&gt;          is either:        &lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;br /&gt;an null hedge (ε),&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;a variable from&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;V&lt;/code&gt;,          &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;s&amp;lt;h&amp;gt;&lt;/code&gt;            where            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;s&lt;/code&gt;            is a symbol from            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;S&lt;/code&gt;            and            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;h&lt;/code&gt;            is again a hedge,          &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;or a concatenation of two hedges &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;i.j&lt;/code&gt;.          &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;This text uses same hedge notation as used by Murata Makoto in [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e951" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;HEDGE&lt;/span&gt;&lt;/a&gt;].      &lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e193"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;1.&amp;nbsp;Example hedge notation&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;pre class="content-programlisting"&gt;a&amp;lt;b c&amp;lt;f g&amp;lt;χ&amp;gt;&amp;gt; d&amp;lt;ψ&amp;gt; e&amp;gt;&lt;/pre&gt;Alternatively we can depict hedges also using diagrams. The same hedge again in a different notation.        &lt;br /&gt;&lt;div class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_61tWql86I/AAAAAAAADU8/feKp3zSuK2I/s1600/hedge.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_rwM3HrdhDr8/S_61tWql86I/AAAAAAAADU8/feKp3zSuK2I/s320/hedge.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;Note that symbols occur in hedges only in non-leaf nodes and variables in leafs.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Any XML document can simply be converted into the hedge notation. Tags are represented through symbols and        their textual content as variables (In this case we abstract from XML attributes). Such conversion is        demonstrated within the next example.      &lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e207"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;2.&amp;nbsp;XML document as a hedge&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;Here is an simple HTML document.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;  &amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;Example&amp;lt;/title&amp;gt;&lt;br /&gt;  &amp;lt;/head&amp;gt;&lt;br /&gt;  &amp;lt;body&amp;gt;&lt;br /&gt;    &amp;lt;p&amp;gt;Foo&amp;lt;/p&amp;gt;&lt;br /&gt;  &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;The following hedge is equivalent to the previous document.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;html&amp;lt;head&amp;lt;title&amp;lt;'Example'&amp;gt; body&amp;lt;p&amp;lt;'Foo'&amp;gt;&amp;gt;&lt;/pre&gt;In this case the set of symbols          &lt;span class="content-mathphrase"&gt;S = { html, head, title, body, p }&lt;/span&gt;          and          &lt;span class="content-mathphrase"&gt;V = { 'Foo', 'Example' }&lt;/span&gt;        &lt;/div&gt;&lt;/div&gt;&lt;br class="figure-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e228"&gt;&lt;/a&gt;Regular Hedge Grammar&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Now it is the right time to introduce the Regular Hedge Grammar (RHG) which is a mechanism for generation of        different hedges. For a grammar there is an algorithmic way how to decide whether a particular word belongs to        a language generated by that grammar.      &lt;br /&gt;This process in called validation in the XML terminology and any particular RHG which generates a set of        hedges may be understood as a schema which defines all valid XML documents.      &lt;br /&gt;Validation of an XML document against a schema is a task of converting a RHG into a hedge automaton and try        whether it accepts the input document or not.      &lt;br /&gt;Formal definition of RHG is very similar to the regular grammar definition described in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#intro" title="Introduction" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “Introduction”&lt;/a&gt;.      &lt;br /&gt;Regular hedge grammar is a formal grammar which is defined in        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e951" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;HEDGE&lt;/span&gt;&lt;/a&gt;]        as a finite set of terminal symbols &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;S&lt;/code&gt;, a finite set of non-terminals &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;N&lt;/code&gt;,        a finite set of variables        &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;V&lt;/code&gt;        a set of production rules        &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;P&lt;/code&gt;        and        &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r&lt;/code&gt;        which is a regular expression composed of non-terminals.      &lt;br /&gt;&lt;div class="content-orderedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;RHG production rules&lt;/b&gt;&lt;/div&gt;Production rules in          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;P&lt;/code&gt;          are only of the following form.        &lt;br /&gt;&lt;ol type="1"&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;            →&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;v&lt;/code&gt;; where            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;            is a non-terminal and            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;v&lt;/code&gt;            is a variable. Applying this production rules means a non-terminal is replaced by a variable.          &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;            →&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;s&amp;lt;r&amp;gt;&lt;/code&gt;; where            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;n&lt;/code&gt;            is a non-terminal,            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;s&lt;/code&gt;            is a symbol and            &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r&lt;/code&gt;            is a regular expression composed of non-terminal symbols. If this            production rule gets applied a non-terminal is replaced by a terminal symbol which contains a sequence            of non-terminals matching the regular expression &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r&lt;/code&gt;.          &lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;The language generated by the RHG is a set of hedges generated by applying the production rules to a set        non-terminals which match the regular expression &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;r&lt;/code&gt;.      &lt;br /&gt;The use of RHGs as a schema can be demonstrated on a simple example. Imagine, we like to define an        simplification of the        HTML language, where the root element is        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;html&lt;/code&gt;        which must contain one        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt;        and one        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;body&lt;/code&gt;        element in a sequence. Further, there is one        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;title&lt;/code&gt;        element in        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt;        and an unlimited        amount of        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;p&lt;/code&gt;        or        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;img&lt;/code&gt;        in the        &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;body&lt;/code&gt;        in any order.      &lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="schema"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;3.&amp;nbsp;Schema in RHG&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;The verbal definition may be expressed formally in DTD as follows.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;!ELEMENT  html (head, body)&amp;gt;&lt;br /&gt;&amp;lt;!ELEMENT  body (p|img)*&amp;gt;&lt;br /&gt;&amp;lt;!ELEMENT  head  (title)&amp;gt;&lt;br /&gt;&amp;lt;!ELEMENT  title   (#PCDATA)&amp;gt;&lt;br /&gt;&amp;lt;!ELEMENT  p   (#PCDATA)&amp;gt;&lt;br /&gt;&amp;lt;!ELEMENT  img  EMPTY&amp;gt;&lt;/pre&gt;The same definition in the RHG notation.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;S = {html, head, body, title, p, img }&lt;br /&gt;V = { "#PCDATA" }&lt;br /&gt;N = { N(html), N(head), N(body), N(title), N(p), N(img), N(pcdata) }&lt;br /&gt;P = { N(html)  →  html&amp;lt;N(head), N(body)&amp;gt;&lt;br /&gt;      N(head)  →  head&amp;lt;N(title)&amp;gt;&lt;br /&gt;      N(body)  →  body&amp;lt;(N(p) | N(img))*&amp;gt;&lt;br /&gt;      N(title) →  title&amp;lt;N(pcdata)&amp;gt;&lt;br /&gt;      N(p)     →  p&amp;lt;N(pcdata)&amp;gt;&lt;br /&gt;      N(img)   →  img&amp;lt;ε&amp;gt;&lt;br /&gt;      N(pcdata)→  #PCDATA }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br class="figure-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e350"&gt;&lt;/a&gt;Automata-based Validation&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The validation task for a particular schema (RHG) and a particular XML document (input word) is equivalent        to a task to construct a Deterministic Hedge Automaton (DHA) and find out whether it accepts the input.      &lt;br /&gt;DHA is a finite state automaton (FSA) and as such it is defined with a finite set of symbols, states and        transitional function which transit the automaton from one state to another, depending on the input symbol.      &lt;br /&gt;DHA have just few slight modifications; there are two transition functions, one for symbols (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;        Fs&lt;/code&gt;) and other for variables (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Fv&lt;/code&gt;) and the result of &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Fs&lt;/code&gt; depends        not only on the current state and the input symbol, but it depends on a set of states which are the target        states for the child symbols or values in the hedge.      &lt;br /&gt;&lt;div class="content-orderedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;Here is the formal definition of a DHA taken from [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e951" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;HEDGE&lt;/span&gt;&lt;/a&gt;]. DHA is a sextuple (&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;S&lt;/code&gt;, &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;V&lt;/code&gt;, &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt;, &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;F&lt;/code&gt;, &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Fs&lt;/code&gt;, &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Fv&lt;/code&gt;), where:&lt;/b&gt;&lt;/div&gt;&lt;ol type="1"&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;S&lt;/code&gt; is a finite set of symbols,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;V&lt;/code&gt; is a finite set of values,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt; is a finite set of states,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;F&lt;/code&gt; is a set of terminal states, a regular set over &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt;,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Fs&lt;/code&gt; is a function from &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;S&lt;/code&gt; × &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q*&lt;/code&gt; → &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt; such that for every &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;q&lt;/code&gt; in &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt; and &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;s&lt;/code&gt; in &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;S&lt;/code&gt;, {q1 q2 ... qk | k &amp;gt;= 0, α(x, q1 q2 ... qk ) = q } is a regular set,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Fv&lt;/code&gt; is a function from &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;V&lt;/code&gt; → &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Q&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e453"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;4.&amp;nbsp;Example of the DHA process&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;Here is the very same HTML document which we created grammar for in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#schema" title="Figure 3. Schema in RHG" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;3, “Schema in RHG”&lt;/a&gt;.        &lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;  &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Test&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;  &amp;lt;body&amp;gt;&lt;br /&gt;    &amp;lt;img/&amp;gt;&lt;br /&gt;  &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;And this is how a DHA evaluates the transition functions.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;Fs(html, Fs(head, Fs(title,Fv('Test')))Fs(body, Fs(img, ε)))&lt;br /&gt;&lt;br /&gt;Fs(head, Fs(title,Fv('Test')))Fs(body, Fs(img, ε)) → Fs(head, Fs(title,Fv('Test')))&lt;br /&gt;Fs(head, Fs(title,Fv('Test')))Fs(body, Fs(img, ε)) → Fs(body, Fs(img, ε))&lt;br /&gt;&lt;br /&gt;Fs(head, Fs(title,Fv('Test'))) → Fs(title,Fv('Test'))&lt;br /&gt;&lt;br /&gt;Fs(body, Fs(img, ε)) → Fs(img, ε)&lt;br /&gt;&lt;br /&gt;Fs(title,Fv('Test')) → Fv('Test')&lt;br /&gt;&lt;br /&gt;Fs(img, ε) → ε&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Note that validation using RHG is used withing one of the current mainstream validation languages Relax NG, see [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e1001" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;RNG&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;The Fs function which accepts multiple states as parameters makes it difficult to depict a finite hedge automaton      in a diagram, thus in the later text we will use a classical finite state automaton to demonstrate regular grammar-based  XML validation      process. The expressive power is the same and we may depict such automata more easily and make the diagrams more      understandable.      &lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e473"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;5.&amp;nbsp;XML Validating FSA&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;In the diagram you can see a FSA which validates XML documents against the schema described in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#schema" title="Figure 3. Schema in RHG" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Figure&amp;nbsp;3, “Schema in RHG”&lt;/a&gt;. For any symbol which has no          explicit transition in the diagram the target state is          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ERROR&lt;/code&gt;.          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ERROR&lt;/code&gt; is not part of the final state set and thus any input document which leads the DHA to          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ERROR&lt;/code&gt; is considered to be invalid. Only          &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;FIN&lt;/code&gt; belongs to &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;F&lt;/code&gt;; the set of terminal states.        &lt;br /&gt;&lt;div class="content-mediaobject"&gt;&lt;img alt="XML Validating FSA" src="media/article/automaton_sml.png" /&gt;&lt;/div&gt;Note, there are tree different arrows pointing from the &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;B1&lt;/code&gt; state, because          &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;body&lt;/code&gt; may contain &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;p | img | ε&lt;/code&gt;.        &lt;br /&gt;The final state for an invalid document doesn't need to be &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ERROR&lt;/code&gt;. For example          a document which would be missing the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;html&lt;/code&gt; end tag but otherwise it is correct will finish in the &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;B3&lt;/code&gt;          state and thus the automaton won't accept it.        &lt;br /&gt;Using FSA we can express many common restrictions within XML trees, thus it is a suitable model for us at this stage.        For example a sequence of &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;head&lt;/code&gt; and &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;body&lt;/code&gt; elements which has a strict order is        expressed with the transition from &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;H5 → H6 → B1&lt;/code&gt;.&lt;br /&gt;In case we like to express an arbitrary order of child elements withing a parent we can use multiple          transitions from one state as demonstrated in the &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;B1&lt;/code&gt; state pointing to &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;P1&lt;/code&gt; and &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;I1&lt;/code&gt;.        &lt;/div&gt;&lt;/div&gt;&lt;br class="figure-break" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e543"&gt;&lt;/a&gt;Grammar and Diagnostics&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Regular grammar-based validation is fast and straight forward, but does it really give suitable validation outputs?   Experiences from the SGML/XML world shows that not always. With grammars it is easy to find out that something is wrong   in the document, but it is more difficult to explain where exactly the problem occurred and extremely difficult   to guide the author to resolve the issue or to explain the issue in a human understandable form.&lt;br /&gt;One sort of problems with diagnostics can be explained with a example grammar for a simple Member of Parliament    evidence. MPs are identified by &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;name&lt;/code&gt; which is required and also each MP must have one assistant. The only    exception is the Speaker of the Parliament who has two assistants. The door number of the MPs office is optional.  &lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e553"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;6.&amp;nbsp;Schema for MPs evidence&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;!ELEMENT  MP (name, (speaker, assistant)?, assistant, office?)&lt;br /&gt;&amp;lt;!ELEMENT  office    (#PCDATA)&amp;gt;&lt;br /&gt;&amp;lt;!ELEMENT  assistant (#PCDATA)&amp;gt;&lt;br /&gt;&amp;lt;!ELEMENT  speaker  EMPTY&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Next we construct a FSA automaton to validate such grammar. Such automaton is depicted in the next diagram.    &lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e560"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;7.&amp;nbsp;Validator for the MPs evidence grammar&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;div class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_61xjPioEI/AAAAAAAADVE/L-_TXbWB5_s/s1600/automaton_sml.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_61xjPioEI/AAAAAAAADVE/L-_TXbWB5_s/s320/automaton_sml.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Next consider several example of instances, their validation flow and the validation results.&lt;br /&gt;&lt;div class="table"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e568"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Instances and validation&lt;/b&gt;&lt;/div&gt;&lt;div class="table-contents"&gt;&lt;table border="1" summary="Instances and validation"&gt;&lt;colgroup&gt;&lt;col align="left"&gt;&lt;/col&gt;&lt;col align="left"&gt;&lt;/col&gt;&lt;col align="center"&gt;&lt;/col&gt;&lt;col align="left"&gt;&lt;/col&gt;&lt;col align="left"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;thead&gt;&lt;tr&gt;&lt;th align="left" valign="top"&gt;Nr&lt;/th&gt;&lt;th align="left" valign="top"&gt;Document&lt;/th&gt;&lt;th align="center" valign="top"&gt;Flow&lt;/th&gt;&lt;th align="left" valign="top"&gt;Error&lt;/th&gt;&lt;th align="left" valign="top"&gt;Explanation&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="left" valign="top"&gt;1&lt;/td&gt;&lt;td align="left" class="content-first_column" valign="top"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;MP&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;Miloslav Vlcek&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;speaker/&amp;gt;&lt;br /&gt;  &amp;lt;assistant&amp;gt;Petr Mazalek&amp;lt;/assistant&amp;gt;&lt;br /&gt;  &amp;lt;assistant&amp;gt;Veronika Soumanova&amp;lt;/assistant&amp;gt;&lt;br /&gt;  &amp;lt;office&amp;gt;56&amp;lt;/office&amp;gt;&lt;br /&gt;&amp;lt;/MP&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;td align="center" valign="top"&gt;&lt;pre class="content-programlisting"&gt;START&lt;br /&gt;↓&lt;br /&gt;Q1&lt;br /&gt;↓&lt;br /&gt;Q2&lt;br /&gt;↓&lt;br /&gt;Q3&lt;br /&gt;↓&lt;br /&gt;Q7&lt;br /&gt;↓&lt;br /&gt;Q4&lt;br /&gt;↓&lt;br /&gt;Q4&lt;br /&gt;↓&lt;br /&gt;Q5&lt;br /&gt;↓&lt;br /&gt;Q6&lt;br /&gt;↓&lt;br /&gt;Q4&lt;br /&gt;↓&lt;br /&gt;FIN&lt;/pre&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;&lt;/td&gt;&lt;td&gt;VALID&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top"&gt;2&lt;/td&gt;&lt;td align="left" class="content-first_column" valign="top"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;MP&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;Petr Bradsky&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;assistant&amp;gt;Jaroslava Pokorna&amp;lt;/assistant&amp;gt;&lt;br /&gt;  &amp;lt;office&amp;gt;121&amp;lt;/office&amp;gt;&lt;br /&gt;&amp;lt;/MP&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;td align="center" valign="top"&gt;&lt;pre class="content-programlisting"&gt;START&lt;br /&gt;↓&lt;br /&gt;Q1&lt;br /&gt;↓&lt;br /&gt;Q2&lt;br /&gt;↓&lt;br /&gt;Q4&lt;br /&gt;↓&lt;br /&gt;Q5&lt;br /&gt;↓&lt;br /&gt;Q6&lt;br /&gt;↓&lt;br /&gt;Q4&lt;br /&gt;↓&lt;br /&gt;FIN&lt;/pre&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;&lt;/td&gt;&lt;td&gt;VALID&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top"&gt;3&lt;/td&gt;&lt;td align="left" class="content-first_column" valign="top"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;MP&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;Petr Bradsky&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;assistant&amp;gt;Jaroslava Pokorna&amp;lt;/assistant&amp;gt;&lt;br /&gt;&amp;lt;/MP&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;td align="center" valign="top"&gt;&lt;pre class="content-programlisting"&gt;START&lt;br /&gt;↓&lt;br /&gt;Q1&lt;br /&gt;↓&lt;br /&gt;Q2&lt;br /&gt;↓&lt;br /&gt;Q4&lt;br /&gt;↓&lt;br /&gt;FIN&lt;/pre&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;&lt;/td&gt;&lt;td&gt;VALID&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top"&gt;4&lt;/td&gt;&lt;td align="left" class="content-first_column" valign="top"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;MP&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;Miloslav Vlcek&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;speaker/&amp;gt;&lt;br /&gt;  &amp;lt;assistant&amp;gt;Petr Mazalek&amp;lt;/assistant&amp;gt;&lt;br /&gt;&amp;lt;/MP&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;td align="center" valign="top"&gt;&lt;pre class="content-programlisting"&gt;START&lt;br /&gt;↓&lt;br /&gt;Q1&lt;br /&gt;↓&lt;br /&gt;Q2&lt;br /&gt;↓&lt;br /&gt;Q3&lt;br /&gt;↓&lt;br /&gt;Q7&lt;br /&gt;↓&lt;br /&gt;ERROR&lt;/pre&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;Expected &amp;lt;assistant&amp;gt; but was &amp;lt;/MP&amp;gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;In Q4, to transit to FIN the only non-error input could have been &amp;lt;/MP&amp;gt; or &amp;lt;office&amp;gt;&lt;/td&gt;&lt;td&gt;INVALID&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left" valign="top"&gt;5&lt;/td&gt;&lt;td align="left" class="content-first_column" valign="top"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;MP&amp;gt;&lt;br /&gt;  &amp;lt;name&amp;gt;Miloslav Vlcek&amp;lt;/name&amp;gt;&lt;br /&gt;  &amp;lt;assistant&amp;gt;Petr Mazalek&amp;lt;/assistant&amp;gt;&lt;br /&gt;  &amp;lt;assistant&amp;gt;Veronika Soumanova&amp;lt;/assistant&amp;gt;&lt;br /&gt;&amp;lt;/MP&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;td align="center" valign="top"&gt;&lt;pre class="content-programlisting"&gt;START&lt;br /&gt;↓&lt;br /&gt;Q1&lt;br /&gt;↓&lt;br /&gt;Q2&lt;br /&gt;↓&lt;br /&gt;Q4&lt;br /&gt;↓&lt;br /&gt;ERROR&lt;/pre&gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;Expected &amp;lt;/MP&amp;gt; or &amp;lt;office&amp;gt; but was &amp;lt;assistant&amp;gt;&lt;/td&gt;&lt;td align="left" valign="top"&gt;In Q4, to transit to FIN the only non-error input could have been &amp;lt;/MP&amp;gt; or &amp;lt;office&amp;gt;&lt;/td&gt;&lt;td&gt;INVALID&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;In the table above, the diagnostics for instance number 4 is appropriate. The validation engine expected a      &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assistant&lt;/code&gt; tag but in the instance the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;MP&lt;/code&gt; tag has already been closed. The fix is quite      obvious and clearly explained in the diagnostics. The author shall provide a second sibling &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assistant&lt;/code&gt; element.    &lt;br /&gt;A real problem occurs in the instance number 5 validation example. In this case somebody did obviously      forgotten to mark the MP as the Speaker of the Parliament as nobody else may have two assistants assigned.      The regular grammar-based diagnostics does not help to resolve such issue.    &lt;br /&gt;The location of the error is the second      &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assistant&lt;/code&gt; element, but in reality the error is the missing &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;speaker&lt;/code&gt; element after &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;name&lt;/code&gt;.      The error message claims we have a redundant &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assistant&lt;/code&gt; element, but in this case we are talking about      the Speaker's document and we just forgot to add the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;speaker&lt;/code&gt; element indicator. In this case the validation      result gives us no clue how to resolve the issue, as it does not mention the missing &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;speaker&lt;/code&gt; element at all.    &lt;br /&gt;Moreover, the validation result guides us to delete the second &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assistant&lt;/code&gt; element which is completely      wrong and in addition we would loose important information in order to make the document pass the validation.    &lt;br /&gt;There are many more examples where regular grammar-based validation diagnostics leads to misleading error messages,      but this is not the only problem. As grammar-based validation is completely unaware of the semantics of the validated      language there is no way how to attach reasonable domain specific diagnostics which would help the authors      resolve issues more easily.    &lt;br /&gt;&lt;div class="content-orderedlist"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="messages"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Quality of diagnostics&lt;/b&gt;&lt;/div&gt;Compare the following two validation diagnostics&lt;br /&gt;&lt;ol type="1"&gt;&lt;li&gt;&lt;br /&gt;“&lt;span class="quote"&gt;Expected &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;MP&lt;/code&gt; end tag or &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;office&lt;/code&gt; but was &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assistant&lt;/code&gt;&lt;/span&gt;”.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;“&lt;span class="quote"&gt;Missing &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;speaker&lt;/code&gt; element. 'Miloslav Vlcek' has 2 assistants defined but he is not marked as the Speaker of the Parliament using the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;speaker&lt;/code&gt; tag. Only the Speaker is entitled to have two assistants, regular members may have only one. Either add the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;speaker&lt;/code&gt; element as the first child of the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;MP&lt;/code&gt; element or remove one of the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assistants&lt;/code&gt;.&lt;/span&gt;”.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;It is obvious that the second error massage gives a reasonable resolution to the user but the first message is     completely useless, misleading and wrongly positioned. In the rest of the text we will learn possible     approaches to get to the quality of diagnostics demonstrated in the second sentence in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#messages" title="Quality of diagnostics" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Quality of diagnostics&lt;/a&gt;.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e747"&gt;&lt;/a&gt;Using Rules&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Fortunately grammar-based validation is not the only validation approach which exists today. Rule-based    validation languages are becoming more and more popular.&lt;br /&gt;In principle, rule-based validation matches an input document against a set of patterns which are called rules.    The result of such matching is a set of assertions and diagnostics. [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e1025" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;RJ&lt;/span&gt;&lt;/a&gt;] stresses the distinction    between the assertion text, which is a positive statement of what should be true in the document, and the diagnostics,    which contains specific messages for describing, locating and correcting the problem.    &lt;br /&gt;To illustrate the difference, in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#messages" title="Quality of diagnostics" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Quality of diagnostics&lt;/a&gt; the &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;Missing &lt;code class="content-sgmltag-element"&gt;speaker&lt;/code&gt; element.&lt;/em&gt;&lt;/span&gt; message is the assertion and    the rest of the message is diagnostics.&lt;br /&gt;The rule-based approach is quite double-edged. At one side, when designing the schema we have a more low level control    over the validation process and that is the reason we are able to attach domain specific diagnostics, but on    the other hand, some definitions which are implicitly expressed by declaring an element in a  grammar-based language    need to be expressed in the rule-based approach explicitly, sometimes with more rules. &lt;br /&gt;This is definitely error-prone, because forgetting one of the rules means we have an incomplete schema and    there is no easy way how to detect it. &lt;br /&gt;Another problem of the rule-based approach is performance. Where grammar-based validation can be performed    in a linear time, in rule-based validation the execution time depends on the expressions we use within our rule    assertions. We can easily get into the world of context-sensitive tasks and in case, performance is a important factor    in a certain application, it is necessary to judge each individual rule in terms of performance. In contrast,    schema designers who are using the regular grammar-based approach are free of expression. They may use any language    constructs they like and keep their validation tasks in linear time.     &lt;br /&gt;Even there are downsides of the rule-based approach, it is worth studying it. Grammar-based validation    did already reach its limits in terms of diagnostics and there are many real life validation problems were    diagnostics is far more important than performance. For example validation of complex XML languages with hundreds    of pages of specification like for example HTML, SVG, DocBook and others. In this case authors validate relatively    small documents, but correct diagnostics is very important for them as they did not read the whole specification.    &lt;br /&gt;Moreover, there is a huge area of possibilities for future performance optimisation for rule-based languages.    In the time when they are used as long as grammar based languages are used now, I sure there will be effective    optimisation techniques which will minimize the performance handicap.    &lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e777"&gt;&lt;/a&gt;Schematron&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;To demonstrate the rule-based approach on a few examples, in this section we will have closer look into      Schematron; the major standardized rule-based validation language.&lt;br /&gt;Schematron is a simple XML-based schema language composed just of a few elements and attribute.      There are only six main elements in Schematron which makes it very easy to learn. In this short      introduction to Schematron we will mention just the six most important elements and their semantics      which will allow us to understand how are rules being constructed.&lt;br /&gt;&lt;div class="content-variablelist"&gt;&lt;div class="title"&gt;&lt;b&gt;Four most important Schematron elements&lt;/b&gt;&lt;/div&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="term"&gt;&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;schema&lt;/code&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;the root container for &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;patterns&lt;/code&gt;.&lt;/dd&gt;&lt;dt&gt;&lt;span class="term"&gt;&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;pattern&lt;/code&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;a named container for a set of &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;rules&lt;/code&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="term"&gt;&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;rule&lt;/code&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;a particular rule with a defined &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;context&lt;/code&gt; within the validated document. &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Rules&lt;/code&gt;          contain mixed &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assert&lt;/code&gt; and &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;report&lt;/code&gt; elements.&lt;/dd&gt;&lt;dt&gt;&lt;span class="term"&gt;&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;assert&lt;/code&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;Assertion contains a statement about the document in a formal language which          may be automatically evaluated against the document from within the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;rules context&lt;/code&gt;. In case the          assertion is not satisfied, an attached plain text explanation of the problem is displayed to the end-user.          &lt;/dd&gt;&lt;dt&gt;&lt;span class="term"&gt;&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;report&lt;/code&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;Report is equivalent to assertion, but the attached plain text is invoked in case the          report's &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;test&lt;/code&gt; expression is evaluated as TRUE (opposite to the assertion).          &lt;/dd&gt;&lt;dt&gt;&lt;span class="term"&gt;&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;value-of&lt;/code&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;This element allows to enrich the diagnostics with values from withing the          current &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;rule&lt;/code&gt; context of the document to enhance the diagnostics with additional guidance          for the author to resolve the reported issue.          &lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;Although Schematron uses XPath as the preferred formal language to evaluate assertions and reports      against XML document, it is possible to use also other languages able to address nodes and values within      the XML DOM tree; for example JavaScript is a good candidate.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e857"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;8.&amp;nbsp;Schematron rule example&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_615nJ-ZuI/AAAAAAAADVM/KAIW7CPsJCg/s1600/automaton_contact_sml.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_615nJ-ZuI/AAAAAAAADVM/KAIW7CPsJCg/s320/automaton_contact_sml.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="title"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;Now we can return to our MP evidence problem and try to reach the level of diagnostics shown in        the second message in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#messages" title="Quality of diagnostics" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Quality of diagnostics&lt;/a&gt;.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;sch:pattern name="MP Evidence"&amp;gt;&lt;br /&gt;    &amp;lt;sch:rule context="MP"&amp;gt;&lt;br /&gt;        &amp;lt;sch:assert report="count(assistant) &amp;gt; 0 and not(speaker)"&amp;gt;&lt;br /&gt;                Missing speaker element.&lt;br /&gt;                '&amp;lt;sch:value-of select="name"/&amp;gt;' has &amp;lt;sch:value-of select="count(assistant)"/&amp;gt; assistant(s) defined but he is not marked as the Speaker of the Parliament using the speaker tag. Only the Speaker is entitled to have two assistants, regular members may have only one. Either add the speaker element as the first child of the MP element or remove one of the assistants.&lt;br /&gt;        &amp;lt;/sch:assert&amp;gt;&lt;br /&gt;    &amp;lt;/sch:rule&amp;gt;&lt;br /&gt;&amp;lt;/sch:pattern&amp;gt;&lt;/pre&gt;Note that in Schematron there is a way how to logically split assertion texts and diagnostics. To simplify        the example, those two distinct parts of the error message has been put together as the report text.        &lt;br /&gt;In terms of performance optimisation, Schematron features the phases construct. Patterns        may be organized into phases and during validation only a certain phase may be evaluated.        Just in case there are no errors the next phase gets processed.&lt;/div&gt;&lt;/div&gt;&lt;br class="figure-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e870"&gt;&lt;/a&gt;Expressiveness&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;It is difficult to say which approach (rules or grammar) is more expressive. The set of documents      able to be described by a rule-based approach (Schematron) and a regular grammar-based approach are      two distinct sets with a significant intersection. But there are documents which may be described with one      approach but cannot be described with the other.&lt;br /&gt;On the other hand there are many real life use-cases where Schematron can be used to model       some restrictions which are really useful but they can't be expressed using regular grammar-based validation.       This is caused by the fact that Schematron can operate with multiple contexts across the documents where        grammar-based languages usually model just simple parent-child relationships withing the context of the        current parent element. With Schematron we may for example condition the occurrence of an element by the values        of an attribute in a completely different branch of the document. This is very powerful and has many real life        use-cases. For example, using Schematron I was able to formalize additional restrictions expressed in the HTML        specification only verbally; thus improving validation results and diagnostics for HTML document validation, see        [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e965" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;PN1&lt;/span&gt;&lt;/a&gt;].&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e880"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;9.&amp;nbsp;Schematron rule not expressible using a regular grammar-based approach&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;This example was taken from [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e965" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;PN1&lt;/span&gt;&lt;/a&gt;] and is based in my        Schematron schema for W3C WCAG 1.0 specification. &lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;sch:rule context="html:abbr"&amp;gt;&lt;br /&gt;  &amp;lt;sch:report test="not(@title) and not(preceding::html:abbr[. = string(current())][@title])"&amp;gt;&lt;br /&gt;   WCAG 1.0 Checkpoint 4.2 (Priority 3) First occurrence of abbreviation in a document needs to have an title defined.&lt;br /&gt;  &amp;lt;/sch:report&amp;gt;&lt;br /&gt;&amp;lt;/sch:rule&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;When thinking about suitability of grammar or rules for different validation tasks, we can easily come      to a conclusion that a mixture of both approaches would bring the best of both worlds. This is the approach      proposed in [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e965" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;PN1&lt;/span&gt;&lt;/a&gt;]. Such approach encourages to use a grammar-based language to enumerate      elements and attributes and define their content model easily and to use rules to define advanced multi-context      assertions with enhanced diagnostics. This approach was used to model extended HTML schemas in [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e965" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;PN1&lt;/span&gt;&lt;/a&gt;].      &lt;/div&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e898"&gt;&lt;/a&gt;From Grammar to Rules&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Another approach to combine rules and grammar is a to convert grammar-based schemas to Schematron rules.    Such conversion may slightly enhance diagnostics by keeping simplicity of expression. Also such generated    schemas become really platform/programming language independent as we don't need any validation engine for    our specific schema language, but validation becomes a simple XSLT transformation and today an XSLT processor    is present in vast majority of environments (even a web browser can be used as an XSLT processor).    &lt;br /&gt;Converting grammar to rules makes also integration of grammar-based language with Schematron    easy as the generated rules may be simply merged with some additional rules defined.    &lt;br /&gt;There are clearly advantages to convert grammar-based schemas to rules, but how to achieve that?    As we stated, those two approaches are not equally expressive, we already know that this conversion    cannot be exhaustive. But in real life this may not be a big problem, because most of the reasonable    constructs defined in regular grammar-based schema languages can be expressed using rules. But    there is no simple algorithmic way how to convert a FSA into a set of XPath rules. So the    task here is to go through different constructs of a particular grammar-based language and    invent templates to convert them into Schematron patterns.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e907"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;10.&amp;nbsp;Grammar validation using pure rules&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_61-i7O8yI/AAAAAAAADVU/PIcvqZUdR4M/s1600/conversion_sml.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_rwM3HrdhDr8/S_61-i7O8yI/AAAAAAAADVU/PIcvqZUdR4M/s320/conversion_sml.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="title"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;The following diagram show the validation process including conversion. A grammar-based schema      is first converted to rules, rules are merged with other restrictions already defined using rules,      rules are grouped into phases to optimise performance and enhance diagnostics. Finally, an input document      is validated against the generated and merged rules.      &lt;br /&gt;The conversion as well as the validation process may be nothing else than a standard XSLT transformation.              &lt;br /&gt;&lt;div class="content-mediaobject"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The most tricky part of the diagram above is of course conversion to Schematron. There is currently    no such converter and implementation of such conversion is under research. In the simplest case, [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455#d307e1025" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;RJ&lt;/span&gt;&lt;/a&gt;]    mentions a straightforward way how to get grammars into XSLT using the XSLT 2 build-in regular expression engine.    With regular expressions we can express cardinality, sequence, choice and other constructs common in grammar-based    schemas. The advantage is, with such conversion we can do validation tasks using a standard XSLT 2 transformer, but on the    other hand, there is no improvement in diagnostics. Again we are just doing a regular grammar-based validation with a FSA.    &lt;br /&gt;Another approach is to break individual grammar-based restrictions into different kind or rule types. For example    the grammar-based schema enumerates all allowed element and attributes. This may be converted into Schematron rule    which checks that for every element and attribute in the input document the element or attribute names belong into a    set of allowed names, otherwise an unknown element error is reported.&lt;br /&gt;Also it is easy to extract content models for each element (what different children it is allowed to contain)    and for each element create a rule that checks that all children belong to a particular set of allowed child elements    for that particular parent.&lt;br /&gt;Having such rules does not really bring domain related explanations, but on the other hand, grammar-based    validators are usually not able to show all violated rules in a sub-tree as they already die on the first    error occurrence as they move to a &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;ERROR&lt;/code&gt; state and there is no way out. In contrast Schematron    rules will show all diagnostics of all violated assertions in one validation run which is a diagnostic improvement.    Also it is possible to group certain type of checks into phases and systematically point our validation      effort at some sort of issues.&lt;br /&gt;As result, we can have phases for validation of mistakes in element or attribute names, for broken content    models, for required elements or attribute if whether they are present and for all sort of different groups of problems. &lt;br /&gt;Moreover, one part of our rule-based schema may be auto-generated from a grammar schema, not forcing    us doing a lot of implicit rules manually, but another part of the rules may be defined explicitly    with domain specific diagnostics. Another big challenge of the converting method is to find effective    ways how to merge the generated implicit rules with the explicit one and thus enriching the validation    results with highly specific and domain related diagnostics.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="conclusions"&gt;&lt;/a&gt;Conclusions&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;This article explains principles of XML document validation. Regular grammar-based validation is explained    in detail using examples and diagrams. One of the examples demonstrates limits of regular grammar-based    validation diagnostics.&lt;br /&gt;The aim of this article is to show that despite its efficiency, regular grammar-based validation diagnostics    is inappropriate for some applications. Error messages may be located wrongly and their explanation may be confusing    for the XML document author.&lt;br /&gt;One of the options to overcome such limitations is to use rule-based systems instead. Rule-based languages    are more expressive for some sort of restrictions and they have much better diagnostics as they allow to control    the error message form by the schema author. On the other hand it is more difficult to model some sort of simple    relationships and a big issue is optimization. It is difficult to judge the computing price of different rules.    But although there are drawbacks it is necessary to investigate new ways in validation because classical    grammar-based approach did reach its limit already long time ago in terms of diagnostics and currently it is    insufficient for some sort of tasks.&lt;br /&gt;Very promising seems a hybrid approach exploiting the best of grammars and the best of rules in one validation    process. Rules may be directly embedded into grammar-based schemas.&lt;br /&gt;Another way is to get simplicity of expression using the grammar approach but enhance diagnostics through    converting grammar definitions to rules before validation.&lt;br /&gt;All approaches have their pros and cons and they are more or less suitable for different purposes. But the    lack of good diagnostics in grammar-based validation is an outstanding issue which needs to be coped with.    That's why exploring novel ways in XML document validation is important.&lt;/div&gt;&lt;div class="content-bibliography"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="biblio"&gt;&lt;/a&gt;Bibliography&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e951"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;HEDGE&lt;/abbr&gt;]             Murata, M.:&lt;span class="content-title"&gt;Hedge automata: a formal model for XML schemata&lt;/span&gt;.      Fuji Xerox Information Systems. 2000.      &lt;span class="content-bibliomisc"&gt;Available at:        &lt;a href="http://www.xml.gr.jp/relax/hedge_nice.html" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;http://www.xml.gr.jp/relax/hedge_nice.html        &lt;/a&gt;      &lt;/span&gt;    &lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e965"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;PN1&lt;/abbr&gt;]         Kosek, J., Nálevka, P.: &lt;span class="content-title"&gt;Relaxed — on the Way Towards True Validation of Compound Documents&lt;/span&gt;.    WWW2006, Edinburg, 2006.    &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www2006.org/programme/files/pdf/4508.pdf" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www2006.org/programme/files/pdf/4508.pdf&lt;/a&gt;&lt;/span&gt;    &lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e977"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;PN2&lt;/abbr&gt;]         Nálevka, P.: &lt;span class="content-title"&gt;Doplňková validate HTML a XHTML dokumentů&lt;/span&gt;.    University of Economics, Prague, 2003.    &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://nalevka.com/resources/thesis.pdf" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://nalevka.com/resources/thesis.pdf&lt;/a&gt;&lt;/span&gt;    &lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e989"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;PN3&lt;/abbr&gt;]         Nálevka, P., Kosek, J.: &lt;span class="content-title"&gt;Advanced approaches to XML document validation&lt;/span&gt;.    Extreme Mark-up Languages Conference, Montreal, 2007.     &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.idealliance.org/papers/extreme/proceedings/xslfo-pdf/2007/Nalevka01/EML2007Nalevka01.pdf" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.idealliance.org/papers/extreme/proceedings/xslfo-pdf/2007/Nalevka01/EML2007Nalevka01.pdf&lt;/a&gt;&lt;/span&gt;    &lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e1001"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;RNG&lt;/abbr&gt;]         Clark, J., Murata, M.: &lt;span class="content-title"&gt;RELAX NG Specification&lt;/span&gt;.    OASIS Committee Specification, 2001.    &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.relaxng.org/spec-20011203.html" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.relaxng.org/spec-20011203.html&lt;/a&gt;&lt;/span&gt;    &lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e1013"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;SCH&lt;/abbr&gt;]         Jelliffe, R.: &lt;span class="content-title"&gt;The Schematron Assertion Language 1.5&lt;/span&gt;.    Academia Sinica Computing Centre, 2002.    &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://xml.ascc.net/resource/schematron/Schematron2000.html" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://xml.ascc.net/resource/schematron/Schematron2000.html&lt;/a&gt;&lt;/span&gt;    &lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e1025"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;RJ&lt;/abbr&gt;]         Jelliffe, R.: &lt;span class="content-title"&gt;Converting XML Schemas to Schematron&lt;/span&gt;.    O'Reilly XML Blog, 2007.    &lt;span class="content-bibliomisc"&gt;Available at: &lt;a href="http://www.oreillynet.com/xml/blog/2007/09/converting_xml_schemas_to_sche.html" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;http://www.oreillynet.com/xml/blog/2007/09/converting_xml_schemas_to_sche.html&lt;/a&gt;&lt;/span&gt;    &lt;/div&gt;&lt;/div&gt;&lt;div class="content-bibliomixed"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=6734189080358872455" id="d307e1037"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="content-bibliomixed"&gt;[&lt;abbr class="abbrev"&gt;MI&lt;/abbr&gt;]         Ivánek, J.: &lt;span class="content-title"&gt;Základy matematické informatiky I: Informace a automaty&lt;/span&gt;.    Státní pedagogické nakladatelství, 1991, Praha, ISBN: 80-7079-673-1.    &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-6734189080358872455?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/6734189080358872455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/grammar-vs-rules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/6734189080358872455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/6734189080358872455'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/grammar-vs-rules.html' title='Grammar vs. Rules'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_rwM3HrdhDr8/S_61tWql86I/AAAAAAAADU8/feKp3zSuK2I/s72-c/hedge.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-8184166457070821223</id><published>2010-05-27T11:07:00.000-07:00</published><updated>2010-05-27T11:33:22.315-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><title type='text'>Semantics in HTML</title><content type='html'>&lt;div class="content-article" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;/div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;div class="content-side" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;/div&gt;&lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;PDF Presentation&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="https://docs.google.com/fileview?id=0B-0OqYOWDDvOMjgxOTA4YjItMGQ2MS00NTJhLThlZGEtZDZmNzg0OTNiNTlh&amp;amp;hl=en" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;semanticHTML.pdf&lt;/a&gt;.    &lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;/div&gt;HTML (HyperText Markup Language and all it's derivates is probably the most    successful and widely used mark-up language ever. In has been used and missused    over last decades for variety of very different tasks. This had a destructive effect on the language and    significantly influenced it's semantics.&lt;br /&gt;As a result semantics is withdrawing from HTML. Current HTML code is mostly just a sequence of    semantically empty &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;div span&lt;/code&gt; elements. The difference between those two is purely presenational    and may be expressed as &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;display: block/inline&lt;/code&gt;.&lt;br /&gt;When talking about semantics in current current HTML, it is probably hiding in the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;class&lt;/code&gt;    attribute, although it is mostly only used to map elements to their CSS presentation. Expressing semantics in    &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;class&lt;/code&gt; is better than no semantics at all, but the model is ill. Why not expressing the semantic    category directly using the element name? Putting semantically empty &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;div span&lt;/code&gt; sequences is error prone    and redundant (this is the approach used by microformats). It more difficult to process such documents    using XML tools (XSLT, XQuery...), it is more diffcult to write and maintain schemas for such languages.    &lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=8184166457070821223" id="schema"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;1.&amp;nbsp;Get rid of unnecessary HTML elements&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;There is something wrong in the following code fragment (a weather box in a HTML document).&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;div class=”weather”&amp;gt;&lt;br /&gt;  &amp;lt;span class=”title”&amp;gt;Weather Forecast&amp;lt;/span&amp;gt;&lt;br /&gt;  &amp;lt;span class=”city”&amp;gt;Prague&amp;lt;/span&amp;gt;&lt;br /&gt;  &amp;lt;span class=”temperature”&amp;gt;25&amp;amp;deg;C&amp;lt;/span&amp;gt;&lt;br /&gt;  &amp;lt;div class=”claudy”/&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;We can get rid of redundant &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;div span&lt;/code&gt; and express the semantic information directly. Our code becomes nicer and more readable and easier to process. Also it current mainstream browsers it gets rendered the same as the previous fragment, just few very small changes needs to be applied in the CSS.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;weather&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;Weather Forecast&amp;lt;/title&amp;gt;&lt;br /&gt;  &amp;lt;city&amp;gt;Prague&amp;lt;/city&amp;gt;&lt;br /&gt;  &amp;lt;temperature&amp;gt;25&amp;amp;deg;C&amp;lt;/temperature&amp;gt;&lt;br /&gt;  &amp;lt;claudy/&amp;gt;&lt;br /&gt;&amp;lt;/weather&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;So the lesson is: Today, one language (HTML) is not able to express all the complicated domains    which occur in today's Web. There are: Internet shops, company presentations, newspapers, encyclopedias,    chats, blogs, online community portals, webmail, online PIM with collaboration, porn-sites and many more    applications on the Web and it is ill to map all their complex semantics into two or few more HTML tags.    This leads only to unnecessary lost of semantics in the Web documents which makes them diffult to automatically    process by machines and less accessible for humans.&lt;br /&gt;Rather than using HTML it makes sense to either our own semantics or whenever possible use a common shared    semantics which is understandable also to others. Thanks to XML namespaces and modularization of HTML this is the    prefered and technically feasible approach. To keep as much semantics in Web documents use your own cocktail languages    which is the best fit for what you are trying to say.&lt;br /&gt;I call this approach Semantical Tagging and in fact it a lighweight approach to Semantic Web. Imagine you will    have a shared XML language for estate agencies. Expressing your offert in such laguage makes it possible    to run semantics queries against it. See the following example.&lt;br /&gt;&lt;div class="figure"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=8184166457070821223" id="estate"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Figure&amp;nbsp;2.&amp;nbsp;Use shared semantic languages in your documents&lt;/b&gt;&lt;/div&gt;&lt;div class="figure-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;r:flat xmlns:r="http://www.reality.com/offer" xmlns:r="http://www.reality.com/offer"&amp;gt;&lt;br /&gt;  &amp;lt;r:address&amp;gt;&lt;br /&gt;    &amp;lt;r:street&amp;gt;Raichlova&amp;lt;r:num&amp;gt;2816&amp;lt;/r:num&amp;gt;&amp;lt;r:secNum&amp;gt;8&amp;lt;/secNum&amp;gt;&amp;lt;/r:street&amp;gt;&lt;br /&gt;    &amp;lt;r:postcode&amp;gt;15500&amp;lt;/r:postcode&amp;gt;&amp;lt;r:city&amp;gt;Praha&amp;lt;r:city&amp;gt;&amp;lt;r:cityPart&amp;gt;Praha&lt;br /&gt;13&amp;lt;r:cityPart&amp;gt;&lt;br /&gt;   &amp;lt;r:country&amp;gt;Czech republic&amp;lt;/r:country&amp;gt;&lt;br /&gt;  &amp;lt;/r:address&amp;gt;&lt;br /&gt;  &amp;lt;r:rooms&amp;gt;&lt;br /&gt;    &amp;lt;r:room type="bedroom" sq="18"/&amp;gt;&lt;br /&gt;    &amp;lt;r:room type="kitchen" number=”25”/&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;  &amp;lt;/r:rooms&amp;gt;&lt;br /&gt;  &amp;lt;r:price currency="CZK" vat="19"&amp;gt;7250000&amp;lt;/r:price&amp;gt;&lt;br /&gt;  &amp;lt;r:finishDate&amp;gt;03/04/2008&amp;lt;/r:finishDate&amp;gt;&lt;br /&gt;  &amp;lt;r:floor&amp;gt;4&amp;lt;/r:floor&amp;gt;&lt;br /&gt;  &amp;lt;r:kmToCenter&amp;gt;25&amp;lt;/r:kmToCenter&amp;gt;&lt;br /&gt;  &amp;lt;img xmlns="http://www.w3.org/1999/xhtml/image/" src="/232/343434.jpg"/&amp;gt;&lt;br /&gt;  &amp;lt;r:contact&amp;gt;...&amp;lt;/r:contact&amp;gt;&lt;br /&gt;  &amp;lt;r:orientation&amp;gt;&amp;lt;r:side&amp;gt;north&amp;lt;/r:side&amp;gt;...&amp;lt;r:orientation&amp;gt;&lt;br /&gt;  ...&lt;br /&gt;&amp;lt;/r:flat&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="content-itemizedlist"&gt;&lt;div class="title"&gt;&lt;b&gt;           Having data expressed in the such nice semantic way let you ask semantics queries:        &lt;/b&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li&gt;All flats in Prague less than 30 kilometres from the centre with 5 rooms and at least 100 square meters for less than 6000000 CZK&lt;/li&gt;&lt;li&gt;All flats with a terrace at least 40 meters big&lt;/li&gt;&lt;li&gt;All flats in Prague with a garage and windows oriented on the east side which will be finished this year&lt;/li&gt;&lt;li&gt;All flats without annoying neighbours :)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;This approach to semantic Web is lightweight and no so feature rich like for exmaple RDF/OWL, but it has    several advantages and it may be the preferable approach. Semantic tagging of data is easy, it is similar to what we    have now and it is processable with current mainstream browsers so there is not a big issue with backward comapatibility.    It have one source of data used for both machines nad humans and this is an advatage. Imagine the price of a realproperty    would in RDF (for machines) be two times smaller than in HTML (the version for humans). In such case, when sorting by price,    the search engine will list such offer at the top, thus making it more accessed by humans even the price is not such a bergain.    In semantic tagging this can't happen so easily. One source of data is also easier to maintain.    &lt;br /&gt;Although semantic tagging doesn't allow out of the box reasoning and other advanced features of RDF/OWL, it    brings the most critical and most wanted and features of semantic Web and it can be very easily implemented in current    Web environment.    &lt;br /&gt;For more details about this topic, please read the presentation in &lt;a href="https://docs.google.com/fileview?id=0B-0OqYOWDDvOMjgxOTA4YjItMGQ2MS00NTJhLThlZGEtZDZmNzg0OTNiNTlh&amp;amp;hl=en" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;semanticHTML.pdf&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/942981743092000078-8184166457070821223?l=petrnalevka.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petrnalevka.blogspot.com/feeds/8184166457070821223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/semantics-in-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/8184166457070821223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/942981743092000078/posts/default/8184166457070821223'/><link rel='alternate' type='text/html' href='http://petrnalevka.blogspot.com/2010/05/semantics-in-html.html' title='Semantics in HTML'/><author><name>Petr Nálevka</name><uri>http://www.blogger.com/profile/13283278247233781466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://2.bp.blogspot.com/_rwM3HrdhDr8/S-86Mo8iErI/AAAAAAAABSs/yPBAs_cj8H8/S220/foto.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-942981743092000078.post-1094621655105664826</id><published>2010-05-27T11:03:00.000-07:00</published><updated>2010-05-27T11:33:00.627-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Advanced approaches to XML document validation (Extreme Mark-up Languages 2007)</title><content type='html'>&lt;div class="content-article" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;div class="content-author"&gt;&lt;h3 class="content-author"&gt;&lt;span class="firstname"&gt;Petr&lt;/span&gt; &lt;span class="surname"&gt;Nálevka&lt;/span&gt;&lt;/h3&gt;&lt;div class="content-affiliation"&gt;&lt;span class="content-orgname"&gt;University of Economics, Prague&lt;/span&gt; &lt;span class="content-orgdiv"&gt;Department of Information and Knowledge Engineering&lt;/span&gt;&lt;br /&gt;&lt;div class="content-address"&gt;&lt;span class="street"&gt;W.&amp;nbsp;Churchill&amp;nbsp;Sq.&amp;nbsp;4&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span class="city"&gt;130&amp;nbsp;67&amp;nbsp;Praha&amp;nbsp;3&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span class="country"&gt;Czech&amp;nbsp;Republic&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;code class="content-email" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;a href="mailto:petr@nalevka.com"&gt;petr@nalevka.com&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-author"&gt;&lt;h3 class="content-author"&gt;&lt;span class="firstname"&gt;Jirka&lt;/span&gt; &lt;span class="surname"&gt;Kosek&lt;/span&gt;&lt;/h3&gt;&lt;div class="content-affiliation"&gt;&lt;span class="content-orgname"&gt;University of Economics, Prague&lt;/span&gt; &lt;span class="content-orgdiv"&gt;LISp (Laboratory for Intelligent Systems Prague)&lt;/span&gt;&lt;br /&gt;&lt;div class="content-address"&gt;&lt;span class="street"&gt;W.&amp;nbsp;Churchill&amp;nbsp;Sq.&amp;nbsp;4&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span class="city"&gt;130&amp;nbsp;67&amp;nbsp;Praha&amp;nbsp;3&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span class="country"&gt;Czech&amp;nbsp;Republic&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;code class="content-email" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;a href="mailto:jirka@kosek.cz"&gt;jirka@kosek.cz&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="content-abstract"&gt;&lt;div class="title"&gt;&lt;b&gt;Abstract&lt;/b&gt;&lt;/div&gt;Validation of XML documents is a challanging task whose aim is to ensure interoperability of such documents in various environments. With massive use of different XML languages, automated validation is often the only way to ensure complience with different standards and recommendations.  That's why it is important to use expressive validation languages and powerful and convenient validation tools and techniquest to discover maximum standard violations automatically. This is the aim of the Relaxed project which is introduced within this text. Different approaches to face today's pressing validation issues and challanges used in Relaxed are examined; e. g. maximizing validation results by using expressive validation languages, schema modularization and reuseability,  effective compound document validation and validation of non-XML languages.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;div class="toc"&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#intro"&gt;Introduction&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e107"&gt;Relaxed project indroduction&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#schema.languages"&gt;Seeking schema language expressiveness&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#xhtml.reformulation"&gt;Reformulation of XHTML in Relax NG and Schematron&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#extension"&gt;Extending Relax NG schemas with modules&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#schematron.checks"&gt;Using Schematron to enforce additional checks&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#datatypes"&gt;Support for datatypes&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e333"&gt;Relaxed validation power in action&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#compound-documents"&gt;Compound documents&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#validation"&gt;Validation of compound documents&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#namespace-aware"&gt;XML Schema or RELAX NG is insufficient&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#nvdl"&gt;NVDL&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e591"&gt;Relaxed validation service&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e601"&gt;Real life issues with NVDL&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#relaxed.gui"&gt;The user interface&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#legacy"&gt;Legacy HTML support&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e703"&gt;Future work&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="section"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#conclusions"&gt;Conclusions&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;dt&gt;&lt;span class="bibliography"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#biblio"&gt;Bibliography&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="intro"&gt;&lt;/a&gt;Introduction&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;When exchanging XML documents between different systems, validation is important to ensure interoperability. Validation helps to keep XML documents complient with standards and recommendations for their issueing. Because of limited knowledge and resources, keeping documents standard-complient relies in most cases solely on automated validation. That's why it is important to use expressive schema languages which are able to formalize maximum constraints expressed in the different language specifications and powerful and user-friendly validation tools and techniques.  &lt;br /&gt;The ever growing use of compound XML documents&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#ftn.d300e98" id="d300e98"&gt;1&lt;/a&gt;]&lt;/sup&gt; creates new challanges for automated validation. It is obviously more difficult to interpret a compound document than a standalone one as the processing application needs to consider every vocabulary fragment in the context of other vocabularies to adjust the interpretation accordingly. Compound document validation needs to face new levels of complexity emerging from the fact, different vocabularies can be combined together in various ways, but only some of them are eligible. That's why validation of compound documents becomes an compelling task which requires special approaches.&lt;br /&gt;This text introduces an universal validation tool called Relaxed&lt;a href="http://relaxed.sourceforge.net/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt; &lt;/a&gt; which makes maximum use of modern validation approaches and techniques to deliver comprehensive validation results and to allow straightforward compound document validation. Relaxed focuses mostly on Web documents, where validation plays a major role. Web means using XML documents on a massive scale in a heterogenous environment, where the same document needs to be correctly interpreted on disctinct platforms using different clients. Not only interoperability but also accessibility is very important in case of Web documents and that poses additional demands on the quality of automated validation and expressivity of the schema languages used. &lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="d300e107"&gt;&lt;/a&gt;Relaxed project indroduction&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Relaxed is basically an automated validation tool for XMl documents which focuses mainly on validation of Web documents. It is open source and it has been developed and is further maintained by authors of this text. At first, Relaxed was aimed to create a validation service which would overcome some of the limitations of the widely used W3C validator. The W3C validation service relies solely on DTDs to define various constraints. Such approach is lacking expressive power and namespace support. On the contrary, Relaxed uses modern expressive validation languages for describing maximum constrains to deliver comprehensive validation results to Web document authors in order to help them keep their documents as standard compliant as possible. Today, Relaxed became a universal validation platform aimed to provide support for all sort of validation tasks including validation of predefined or custom compound languages.&lt;br /&gt;Part of the Relaxed project is a HTML 4.0 / XHTML 1.0 schema written from scratch using Relax NG with embedded Schematron rules. Many additional and even complicated restrictions have been expressed thanks to the combination of those two languages which makes those schemas more powerful that the official DTDs provided by W3C. HTML 4.0 and XHTML 1.0 are the today's most widespread standards, but in addition, Relaxed is able to validate some of the WAI's WCAG 1.0 restrictions.&lt;br /&gt;Relaxed also features support for validation of compound documents based partly on Relax NG, but mainly on NVDL (Namespace-based validation dispatching language); an international standard for compound document validation. There are predefined schemas for validation of e. g. XHTML 1.0 + SVG 1.1, XHTML 1.0 + MathML 2.0, XHTML 1.0 + MathML 2.0 + SVG 1.1 documents ready to be used and users may easily create ad-hoc NVDL schemas for their custom compound languages. NVDL support is enabled through JNVDL; a Java-based implementation of the NVDL specification which was developed as part of the Relaxed project. &lt;br /&gt;In addition to the schemas, the Relaxed project consists also of an extensible validation engine written in Java. The engine has support for grouping and annotation schema resources to make them easily accessible to users and for preprocessing of validated instances with filters. Filters are used for example to convert legacy SGML-based HTML 4.01 documents into XML to make them validable by XML-oriented schema languages used in Relaxed or to force a particular doctype definition for validated instances. Forcing doctype is used to adjust Relaxed doctype specific document handling feature. Such feature makes it possible for example to dispatch strict, transitional or frameset HTML documents to be validated against a strict, transitional or frameset schema.&lt;br /&gt;Relaxed validation capabilities are accessible for Web document authors through a Web-based interface. Authors may specify input documents using an URL or upload them directly to the Relaxed server. The validation process can be adjusted using several user options. Relaxed user interface is described in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#relaxed.gui" title="The user interface" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;the section called “The user interface”&lt;/a&gt;.&lt;br /&gt;An exhaustive description of all Relaxed features, project architecture, usage, schemas involved and their expressive power can be found in [&lt;span class="citation"&gt;RLXD&lt;/span&gt;] and [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e720" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;HTML-VAL&lt;/span&gt;&lt;/a&gt;].&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="schema.languages"&gt;&lt;/a&gt;Seeking schema language expressiveness&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Shortly after launching the XML 1.0 standard, it became apparent that DTDs are lacking several critical features needed in many XML applications. The two most important and missing features were support for data types and namespaces. DTD does not include the concept of data types. Every element or attribute value is considered to be almost an arbitrary string. It is not possible to define content to look like a number, a date or a string with a given length. If such constraints are defined in the language specification, DTD does not allow to validate such constraints automatically.&lt;br /&gt;Missing namespace support restraines DTD to be used for single namespace documents only. Even the use of prefixes in such documents is problematic. This is an important drawback, as nowadays, combining vocabularies became the preferable approach for extending XML languages. Limitations of DTD demonstrate the fact it matters what schema language is used to describe a particular vocabulary. It makes sense to choose the most expressive and easy to maintain language.&lt;br /&gt;Several new schema languages were created to overcome DTD limitations. Many of them were just prototypes or proprietary ones. Only two new schema languages got broader acceptance—W3C XMLSchema[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e804" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;XMLSCH-ST&lt;/span&gt;&lt;/a&gt;] and RELAX NG[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e828" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;RNG&lt;/span&gt;&lt;/a&gt;]. Both of those languages have very good support for data typing and namespaces. At the same time there arealso big differences between them. Formal comparison of DTD, W3C XML Schema and Relax NG can be found in [&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#d300e913" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;span class="citation"&gt;SCHTAX&lt;/span&gt;&lt;/a&gt;]. To summarize briefly, Relax NG is the most expressive language and offers the greatest flexibility in modularizing and combining schemas. This is the reason why Relax NG is very popular for creating complex document oriented schemas like&lt;a href="http://www.tei-c.org/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;TEI&lt;/a&gt; or &lt;a href="http://docbook.org/" target="_top" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;DocBook&lt;/a&gt;. W3C XML Schemas are enforcing unambiguity of schema&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#ftn.d300e155" id="d300e155"&gt;2&lt;/a&gt;]&lt;/sup&gt; and thus they are very popular in scenarios whereunambiguous mapping from XML to object or database representation is required.&lt;br /&gt;All previously mentioned schema languages are so called &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;grammar based&lt;/em&gt;&lt;/span&gt; languages. They define grammar of the XML vocabulary by enumerating all elements and their content models. This concept is based on defining just simple paren-child relations and thus may not be sufficient in all situations. Some complex constraints require to define relationships of various nodes in completely different context across the document. In same cases, those constraints may only be defined using &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;rule based&lt;/em&gt;&lt;/span&gt; schema languages like e. g. Schematron. Schematron schema consist of a set of rules which may be expressed for example using XPath expressions that are evaluated against the validated document.&lt;br /&gt;Some schema languages are more or less suitable for constraining some document facets. In order to gain better validation results it is reasonable to combine several schema languages and validate document against all of them. Combination of Schematron with Relax NG or W3C XML Schema is an example of such powerful constraint language. Moreover, extensibility of both W3C XML Schema and Relax NG allows to embed Schematron rules directly into the grammar based schema.&lt;br /&gt;To prove the power of Relax NG and Schematron for Web documents validation, as part of the Relaxed project, XHTML 1.0 has been re-defined from scratch using this combination of languages. Such definition is able to validate more constraints that the original schema and thus keep validated documents closer to standard complience.&lt;br /&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="xhtml.reformulation"&gt;&lt;/a&gt;Reformulation of XHTML in Relax NG and Schematron&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Relax NG and Schematron do not only bring expressivity, but also some sort of elegance of use, good tool support, possibility to easily integrate&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#ftn.d300e176" id="d300e176"&gt;3&lt;/a&gt;]&lt;/sup&gt; both languages and a great support for modularity. That's why Relax NG and Schematron are the languages of the choice for defining complex and modular schemas.&lt;br /&gt;Relaxed XHTML schemas&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#ftn.d300e182" id="d300e182"&gt;4&lt;/a&gt;]&lt;/sup&gt; demonstrate the power of Relax NG modularity. When looking at W3C's XHTML modularization implementations using DTD or XML Schema, a specific model or driver schema is needed for every module combination used. In Relax NG, modularity is much more straightforward. All desired modules can be simply included on the fly without any further preparations. In addition, new modules can be introduced easily without altering any other involved module.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="d300e189"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;1.&amp;nbsp;Modularity in RELAX NG&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;Suppose that a separate hypertext module should add possibility to use anchors (the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;a&lt;/code&gt; element) for linking within inline &lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#ftn.d300e197" id="d300e197"&gt;5&lt;/a&gt;]&lt;/sup&gt; elements. This can be accomplished by a simple definition that adds an &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;a&lt;/code&gt; element into a list of elements which are permitted at the inline level.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;define name="Inline.class" combine="choice"&amp;gt;&lt;br /&gt;  &amp;lt;ref name="a"/&amp;gt;&lt;br /&gt;&amp;lt;/define&amp;gt;&lt;/pre&gt;There is no need to completely redefine the content model in which &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;a&lt;/code&gt; occurs as is necessary in DTD and W3C XML Schema.&lt;br /&gt;The trick here is done through the &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;combine="choice"&lt;/code&gt; method which basically extends the HTML &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Inline.class&lt;/code&gt; definition to contain either some element from the inline model defined elsewhere or the anchor element.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;HTML 4.01 / XHTML 1.0 specification defines three language subsets (&lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;strict&lt;/em&gt;&lt;/span&gt;, &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;transitional&lt;/em&gt;&lt;/span&gt; and &lt;span class="emphasis" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;&lt;em&gt;frameset&lt;/em&gt;&lt;/span&gt;) and every of them has its own monolithic schema. Those three schemas contain a huge number of duplicities. Most of the definition is basically repeated in an unchanged form in all of them. This approach is error-prone and difficult to maintain. One small change in the shared language subset requires definition modifications across all three different schemas. Such schemas are also less readable and difficult to understand. For instance, to find out which elements are shared by allthree subsets, it is necessary to go through all of the schemas.&lt;br /&gt;Relaxed schemas solve all the previously outlined problems. They define the three language subsets just by including the right modules. Common modules are shared among all the subsets. There is no duplicity and separation into modules brings better readability and easier maintenance. With such modular architecture, it is easy to fine-tune the level of restriction during every validation process just by including the right modules into the final schema.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="extension"&gt;&lt;/a&gt;Extending Relax NG schemas with modules&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;With a good initial schema organization it is easy to extend Relax NG schemas to define additional language constructs or even foreign vocabulary fragments&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#ftn.d300e237" id="d300e237"&gt;6&lt;/a&gt;]&lt;/sup&gt; in some context of the validated documents. Thanks to well-designed modularity in Relax NG, making such extensions is straightforward in comparison to other schema languages and nicely designed modules with extended definitions may be even reused in various different schemas.&lt;br /&gt;As an extension example, let's consider the XHTML schema to be extended to allow MathML fragments. As MathML is normally not defined within XHTML, any MathML occurence would be automatically rejected. &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#example.wildcard" title="Example 2. Wildcard named pattern" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;2, “Wildcard named pattern”&lt;/a&gt; demonstrates how to allow foreign elements within some context of XHTML documents using wildcard named patterns (&lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;anyName&lt;/code&gt;). The &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;foreignElement&lt;/code&gt; definition allows an arbitrary tree of foreign (non-XHTML) elements and attributes wherever referenced.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="example.wildcard"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;2.&amp;nbsp;Wildcard named pattern&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;define name="foreignElement"&amp;gt;&lt;br /&gt;  &amp;lt;element&amp;gt;&lt;br /&gt;    &amp;lt;anyName&amp;gt;&lt;br /&gt;      &amp;lt;except&amp;gt;&lt;br /&gt;        &amp;lt;nsName ns="http://www.w3.org/1999/xhtml"/&amp;gt;&lt;br /&gt;      &amp;lt;/except&amp;gt;&lt;br /&gt;    &amp;lt;/anyName&amp;gt;&lt;br /&gt;    &amp;lt;zeroOrMore&amp;gt;&lt;br /&gt;      &amp;lt;choice&amp;gt;&lt;br /&gt;        &amp;lt;attribute&amp;gt;&lt;br /&gt;          &amp;lt;anyName&amp;gt;&lt;br /&gt;            &amp;lt;except&amp;gt;&lt;br /&gt;              &amp;lt;nsName &lt;br /&gt;                  ns="http://www.w3.org/1999/xhtml"/&amp;gt;&lt;br /&gt;            &amp;lt;/except&amp;gt;&lt;br /&gt;          &amp;lt;/anyName&amp;gt;&lt;br /&gt;        &amp;lt;/attribute&amp;gt;&lt;br /&gt;        &amp;lt;text/&amp;gt;&lt;br /&gt;        &amp;lt;ref name="foreignElement"/&amp;gt;&lt;br /&gt;      &amp;lt;/choice&amp;gt;&lt;br /&gt;    &amp;lt;/zeroOrMore&amp;gt;&lt;br /&gt;  &amp;lt;/element&amp;gt;&lt;br /&gt;&amp;lt;/define&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Referencing &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;foreignElement&lt;/code&gt; within inline or block level content model would cause the schema not to report any MathML fragment within this context as an error. But an XHTML + MathML schema is expected to validate any MathML fragment against its schema as defined in  &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#example.xhtml.mathml.rng" title="Example 3. MathML module for the XHTML schema" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;3, “MathML module for the XHTML schema”&lt;/a&gt;. This example shows a simple MathML module. Occurence of MathML in the inline or block level content model is allowed and its consequent validation against &lt;code class="content-filename" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;mathml2.rng&lt;/code&gt; is enabled whenever including such module into the XHTML modular schema. If not included the schema rejects by default any foreign elements. This demonstrates how easy it is to extend a schema and make it less restrictive just by including a new module.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="example.xhtml.mathml.rng"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;3.&amp;nbsp;MathML module for the XHTML schema&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;grammar ns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;&amp;lt;!-- xhtml-mathml-module --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;define name="Block.class" combine="choice"&amp;gt;&lt;br /&gt;  &amp;lt;externalRef href="../mathml/mathml2.rng" &lt;br /&gt;       ns="http://www.w3.org/1998/Math/MathML"/&amp;gt;&lt;br /&gt;&amp;lt;/define&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;define name="Inline.class" combine="choice"&amp;gt;&lt;br /&gt;  &amp;lt;externalRef href="../mathml/mathml2.rng" &lt;br /&gt;       ns="http://www.w3.org/1998/Math/MathML"/&amp;gt;&lt;br /&gt;&amp;lt;/define&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/grammar&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;combine="choice"&lt;/code&gt; combining method extends the HTML &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Block.class&lt;/code&gt; and &lt;code class="content-literal" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Inline.class&lt;/code&gt; definitions to contain either some element from the inline or block content model or a MathML fragment.&lt;br /&gt;Additional modules may also make a schema more restrictive when included. This can be done by overriding a definition completely when importing a module. Relax NG validates documents strictly which means every construct which is not defined is implicitly forbidden. This model makes it easier to make a schema less restrictive using extension modules. Schematron on the other hand validates documents laxly and thus additional modules allways make the schema more restrictive. That is another reason to use those two languages in combination as they can significantly simplify modularization of definitions.&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="schematron.checks"&gt;&lt;/a&gt;Using Schematron to enforce additional checks&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Schematron does not only simplify modularization, but there are several other reasons why embedding Schematron patterns may help to enhance the schema definition. Some restrictions are simply inexpressible using grammar based languages like Relax NG as shown in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#example.multiple" title="Example 4. Selected options" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;4, “Selected options”&lt;/a&gt;.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="example.multiple"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;4.&amp;nbsp;Selected options&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;Sometimes grammar based languages cannot express what is otherwise easily expressible by a rule based language. The following rule ensures that &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;select&lt;/code&gt; elements with an absent &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;multiple&lt;/code&gt; attribute can not have more &lt;code class="content-sgmltag-attribute" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;selected&lt;/code&gt; &lt;code class="content-sgmltag-element" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;options&lt;/code&gt;&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;sch:rule context="html:select"&amp;gt;&lt;br /&gt;  &amp;lt;sch:report test="not(@multiple) and count(html:option[@selected]) &amp;gt; 1"&amp;gt;&lt;br /&gt;    Select elements which aren't marked as multiple may not have more then one selected option.&lt;br /&gt;  &amp;lt;/sch:report&amp;gt;&lt;br /&gt;&amp;lt;/sch:rule&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Combining Relax NG and Schematron brings a strong value added. It may not only increase the expressiveness, but also simplify the schemas and make them more human-readable. For example a simple XPath expression may be used instead of many lines of Relax NG definitions scattered across several schema modules. Both languages have a very distinct philosophy and their use is more or less suitable in different situations and for different purposes. Smart decisions about where to use which language can significantly improve the schemas by getting the best value ofboth.&lt;br /&gt;Only thanks to the expressive power of Schematreon, some advanced and vague constraints contained within WCAG 1.0 (Web Content Accessibility Guidelines) could be formalized within the Relaxed project. Schematron WCAG module within Relaxed allows automated validation of some of the checkpoints. This feature may help Web document authors to make their documents more accessible.   &lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="datatypes"&gt;&lt;/a&gt;Support for datatypes&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;A big advantage of using RELAX NG over DTD are definitely datatypes. DTD's datatypes are very elementary and incompetent to fully express the complexity of HTML datatype requirements. XML Schema datatypes bring a set of thirty seven carefully selected types which can be used within RELAX NG. This set may be further restricted by setting intervals or by using regular expressions.&lt;br /&gt;Relaxed schemas reflect most of the HTML datatype requirements including lengths and multilenghts, characters, pixels, targets, font sizes, colors and many more.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="example.datatypes"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;5.&amp;nbsp;HTML target and tabindex datatype&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;define name="Target.datatype"&amp;gt;&lt;br /&gt;  &amp;lt;data type="string"&amp;gt;&lt;br /&gt;    &amp;lt;param name="pattern"&amp;gt;_(blank|self|parent|top)|[A-Za-z].*&amp;lt;/param&amp;gt;&lt;br /&gt;  &amp;lt;/data&amp;gt;&lt;br /&gt;&amp;lt;/define&amp;gt;&lt;br /&gt;&amp;lt;define name="tabindexNumber.datatype"&amp;gt;&lt;br /&gt;  &amp;lt;data type="nonNegativeInteger"&amp;gt;&lt;br /&gt;    &amp;lt;param name="pattern"&amp;gt;[0-9]+&amp;lt;/param&amp;gt;&lt;br /&gt;    &amp;lt;param name="minInclusive"&amp;gt;0&amp;lt;/param&amp;gt;&lt;br /&gt;    &amp;lt;param name="maxInclusive"&amp;gt;32767&amp;lt;/param&amp;gt;&lt;br /&gt;  &amp;lt;/data&amp;gt;&lt;br /&gt;&amp;lt;/define&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="example.datatypes.schematron"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;6.&amp;nbsp;Schematron datatypes&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;Datatypes may be also expressed using XPath functions in Schematron rules.&lt;br /&gt;&lt;pre class="content-programlisting"&gt;&amp;lt;assert test="string-length(string-normalize(./text())) &amp;amp;gt; 0"&amp;gt;&lt;br /&gt;Must contain a value.&lt;br /&gt;&amp;lt;/assert&amp;gt;&lt;br /&gt;&amp;lt;assert test="number(./text())"&amp;gt;&lt;br /&gt;Int datatype.&lt;br /&gt;&amp;lt;/assert&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br class="example-break" /&gt;&lt;/div&gt;&lt;div class="content-" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="d300e333"&gt;&lt;/a&gt;Relaxed validation power in action&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;This section demostrates the enhanced validation power of the Relaxed XHTML schema. When validating the demonstrational XHTML document shown in &lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#example.invalid.document" title="Example 7. According to W3C validator this document is valid" xmlns:cfn="http://alfa-consult.com/custom-xsl-function"&gt;Example&amp;nbsp;7, “According to W3C validator this document is valid”&lt;/a&gt; using the offcial W3C DTD for XHTML 1.0 or using the W3C validator&lt;sup&gt;[&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826#ftn.d300e340" id="d300e340"&gt;7&lt;/a&gt;]&lt;/sup&gt;, no validation errors appear in the output and the document is considered to be perfectly valid.&lt;br /&gt;&lt;div class="example"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=942981743092000078&amp;amp;postID=1094621655105664826" id="example.invalid.document"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="title"&gt;&lt;b&gt;Example&amp;nbsp;7.&amp;nbsp;According to W3C validator this document is valid&lt;/b&gt;&lt;/div&gt;&lt;div class="example-contents"&gt;&lt;pre class="content-programlisting"&gt;01 &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;02 &amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;br /&gt;03                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;br /&gt;04 &amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;05   &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;W3C validator limitations demo&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;06   &amp;lt;body&amp;gt;&lt;br /&gt;07    &amp;lt;h1&amp;gt;Datatypes&amp;lt;/h1&amp;gt;&lt;br /&gt;08    &amp;lt;table border="10%"&amp;gt;&lt;br /&gt;09      &amp;lt;tbody&amp;gt;&lt;br /&gt;10        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font color="Ivory"&amp;gt;B&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;11     &amp;lt;/tbody&amp;gt;&lt;br /&gt;12   &amp;lt;/table&amp;gt;&lt;br /&gt;13   &amp;lt;h1&amp;gt;Nested forms&amp;lt;/h1&amp;gt;&lt;br /&gt;14   &amp;lt;form name="form2" action="process.form"&amp;gt;&lt;br /&gt;15     &amp;lt;div&amp;gt;&lt;br /&gt;16       &amp;lt;form action="process.subform"&amp;gt;&lt;br /&gt;17         &amp;lt;p&amp;gt;Something is wrong&amp;lt;/p&amp;gt;&lt;br /&gt;18       &amp;lt;/form&amp;gt;&lt;br /&gt;19     &amp;lt;/div&amp;gt;&lt;br
