Adding snippet handler and some more pages

git-svn-id: https://svn.apache.org/repos/asf/servicemix/sandbox/gertv/documentation/trunk@907596 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1de5659
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+target
\ No newline at end of file
diff --git a/common/pom.xml b/common/pom.xml
new file mode 100644
index 0000000..5666ed5
--- /dev/null
+++ b/common/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.servicemix.docs</groupId>
+    <artifactId>parent</artifactId>
+    <version>4.2.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>common</artifactId>
+  <packaging>jar</packaging>
+  
+  <name>Apache ServiceMix :: Common files for documentation</name>
+  <description>Common files (stylesheets, ...)</description>
+  
+  <build>
+    <plugins>
+      <plugin>      
+        <artifactId>maven-remote-resources-plugin</artifactId>
+        <version>1.1</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>bundle</goal>
+            </goals>
+            <configuration>
+              <includes>
+                <include>**/*.xsl</include>
+                <include>**/*.css</include>
+              </includes>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/common/src/main/resources/styles/docbook-fo.xsl b/common/src/main/resources/styles/docbook-fo.xsl
new file mode 100644
index 0000000..5b70e43
--- /dev/null
+++ b/common/src/main/resources/styles/docbook-fo.xsl
@@ -0,0 +1,380 @@
+<?xml version="1.0"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--
+    This XSL is based heavily on the Spring Frameworks' XSL script
+-->
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY admon_gfx_path     "src/docbkx/images/admons/">
+    <!ENTITY copyright "&#xA9;">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  <xsl:import href="urn:docbkx:stylesheet"/>
+
+  <!-- Prevent blank pages in output -->
+  <xsl:template name="book.titlepage.before.verso">
+  </xsl:template>
+  <xsl:template name="book.titlepage.verso">
+  </xsl:template>
+  <xsl:template name="book.titlepage.separator">
+  </xsl:template>
+
+  <!--###################################################
+                        Header
+      ################################################### -->
+
+  <!-- More space in the center header for long text -->
+  <xsl:attribute-set name="header.content.properties">
+    <xsl:attribute name="font-family">
+      <xsl:value-of select="$body.font.family"/>
+    </xsl:attribute>
+    <xsl:attribute name="margin-left">-5em</xsl:attribute>
+    <xsl:attribute name="margin-right">-5em</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!--###################################################
+                        Custom Footer
+      ################################################### -->
+  <xsl:template name="footer.content">
+    <xsl:param name="pageclass" select="''"/>
+    <xsl:param name="sequence" select="''"/>
+    <xsl:param name="position" select="''"/>
+    <xsl:param name="gentext-key" select="''"/>
+    <xsl:variable name="Version">
+      <xsl:if test="//releaseinfo">
+        <xsl:text>Apache ActiveMQ (</xsl:text>
+        <xsl:value-of select="//releaseinfo"/>
+        <xsl:text>)</xsl:text>
+      </xsl:if>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="$sequence='blank'">
+        <xsl:if test="$position = 'center'">
+          <xsl:value-of select="$Version"/>
+        </xsl:if>
+      </xsl:when>
+      <!-- for double sided printing, print page numbers on alternating sides (of the page) -->
+      <xsl:when test="$double.sided != 0">
+        <xsl:choose>
+          <xsl:when test="$sequence = 'even' and $position='left'">
+            <fo:page-number/>
+          </xsl:when>
+          <xsl:when test="$sequence = 'odd' and $position='right'">
+            <fo:page-number/>
+          </xsl:when>
+          <xsl:when test="$position='center'">
+            <xsl:value-of select="$Version"/>
+          </xsl:when>
+        </xsl:choose>
+      </xsl:when>
+      <!-- for single sided printing, print all page numbers on the right (of the page) -->
+      <xsl:when test="$double.sided = 0">
+        <xsl:choose>
+          <xsl:when test="$position='center'">
+            <xsl:value-of select="$Version"/>
+          </xsl:when>
+          <xsl:when test="$position='right'">
+            <fo:page-number/>
+          </xsl:when>
+        </xsl:choose>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+
+  <!--###################################################
+                        Extensions
+      ################################################### -->
+
+  <!-- These extensions are required for table printing and other stuff -->
+  <xsl:param name="use.extensions">1</xsl:param>
+  <xsl:param name="tablecolumns.extension">0</xsl:param>
+  <xsl:param name="callout.extensions">1</xsl:param>
+  <!-- FOP provide only PDF Bookmarks at the moment -->
+  <xsl:param name="fop1.extensions">1</xsl:param>
+
+  <!--###################################################
+                        Table Of Contents
+      ################################################### -->
+
+  <!-- Generate the TOCs for named components only -->
+  <xsl:param name="generate.toc">
+    book toc
+  </xsl:param>
+
+  <!-- Show only Sections up to level 3 in the TOCs -->
+  <!--<xsl:param name="toc.section.depth">2</xsl:param>-->
+
+  <!-- Dot and Whitespace as separator in TOC between Label and Title-->
+  <!--<xsl:param name="autotoc.label.separator" select="'.  '"/>-->
+
+
+  <!--###################################################
+                     Paper & Page Size
+      ################################################### -->
+
+  <!-- Paper type, no headers on blank pages, no double sided printing -->
+  <xsl:param name="paper.type" select="'A4'"/>
+  <xsl:param name="double.sided">0</xsl:param>
+  <xsl:param name="headers.on.blank.pages">0</xsl:param>
+  <xsl:param name="footers.on.blank.pages">0</xsl:param>
+
+  <!-- Space between paper border and content (chaotic stuff, don't touch) -->
+  <xsl:param name="page.margin.top">5mm</xsl:param>
+  <xsl:param name="region.before.extent">10mm</xsl:param>
+  <xsl:param name="body.margin.top">10mm</xsl:param>
+
+  <xsl:param name="body.margin.bottom">15mm</xsl:param>
+  <xsl:param name="region.after.extent">10mm</xsl:param>
+  <xsl:param name="page.margin.bottom">0mm</xsl:param>
+
+  <xsl:param name="page.margin.outer">18mm</xsl:param>
+  <xsl:param name="page.margin.inner">18mm</xsl:param>
+
+  <!-- No intendation of Titles -->
+  <xsl:param name="title.margin.left">0pc</xsl:param>
+
+  <!--###################################################
+                     Fonts & Styles
+      ################################################### -->
+
+  <!-- Left aligned text and no hyphenation -->
+  <xsl:param name="alignment">justify</xsl:param>
+  <xsl:param name="hyphenate">false</xsl:param>
+
+  <!-- Default Font size -->
+  <xsl:param name="body.font.master">11</xsl:param>
+  <xsl:param name="body.font.small">8</xsl:param>
+
+  <!-- Line height in body text -->
+  <xsl:param name="line-height">1.4</xsl:param>
+
+  <!-- Monospaced fonts are smaller than regular text -->
+  <xsl:attribute-set name="monospace.properties">
+    <xsl:attribute name="font-family">
+      <xsl:value-of select="$monospace.font.family"/>
+    </xsl:attribute>
+    <xsl:attribute name="font-size">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!--###################################################
+                     Tables
+      ################################################### -->
+
+  <!-- The table width should be adapted to the paper size -->
+  <xsl:param name="default.table.width">17.4cm</xsl:param>
+
+  <!-- Some padding inside tables -->
+  <xsl:attribute-set name="table.cell.padding">
+    <xsl:attribute name="padding-left">4pt</xsl:attribute>
+    <xsl:attribute name="padding-right">4pt</xsl:attribute>
+    <xsl:attribute name="padding-top">4pt</xsl:attribute>
+    <xsl:attribute name="padding-bottom">4pt</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!-- Only hairlines as frame and cell borders in tables -->
+  <xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
+  <xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
+
+  <!--###################################################
+                           Labels
+      ################################################### -->
+
+  <!-- Label Chapters and Sections (numbering) -->
+  <xsl:param name="chapter.autolabel">1</xsl:param>
+  <xsl:param name="section.autolabel" select="1"/>
+  <xsl:param name="section.label.includes.component.label" select="1"/>
+
+  <!--###################################################
+                           Titles
+      ################################################### -->
+
+  <!-- Chapter title size -->
+  <xsl:attribute-set name="chapter.titlepage.recto.style">
+    <xsl:attribute name="text-align">left</xsl:attribute>
+    <xsl:attribute name="font-weight">bold</xsl:attribute>
+    <xsl:attribute name="font-size">
+      <xsl:value-of select="$body.font.master * 1.8"/>
+      <xsl:text>pt</xsl:text>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
+  <!-- Why is the font-size for chapters hardcoded in the XSL FO templates?
+   Let's remove it, so this sucker can use our attribute-set only... -->
+  <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+              xsl:use-attribute-sets="chapter.titlepage.recto.style">
+      <xsl:call-template name="component.title">
+        <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
+      </xsl:call-template>
+    </fo:block>
+  </xsl:template>
+
+  <!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
+  <xsl:attribute-set name="section.title.level1.properties">
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+    <xsl:attribute name="font-size">
+      <xsl:value-of select="$body.font.master * 1.5"/>
+      <xsl:text>pt</xsl:text>
+    </xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="section.title.level2.properties">
+    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
+    <xsl:attribute name="font-size">
+      <xsl:value-of select="$body.font.master * 1.25"/>
+      <xsl:text>pt</xsl:text>
+    </xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+  </xsl:attribute-set>
+  <xsl:attribute-set name="section.title.level3.properties">
+    <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
+    <xsl:attribute name="font-size">
+      <xsl:value-of select="$body.font.master * 1.0"/>
+      <xsl:text>pt</xsl:text>
+    </xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!-- Titles of formal objects (tables, examples, ...) -->
+  <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
+    <xsl:attribute name="font-weight">bold</xsl:attribute>
+    <xsl:attribute name="font-size">
+      <xsl:value-of select="$body.font.master"/>
+      <xsl:text>pt</xsl:text>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenate">false</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!--###################################################
+                        Programlistings
+      ################################################### -->
+
+  <!-- Verbatim text formatting (programlistings) -->
+  <xsl:attribute-set name="monospace.verbatim.properties">
+    <xsl:attribute name="font-size">
+      <xsl:value-of select="$body.font.small * 1.0"/>
+      <xsl:text>pt</xsl:text>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
+  <xsl:attribute-set name="verbatim.properties">
+    <xsl:attribute name="space-before.minimum">1em</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+    <xsl:attribute name="border-color">#444444</xsl:attribute>
+    <xsl:attribute name="border-style">solid</xsl:attribute>
+    <xsl:attribute name="border-width">0.1pt</xsl:attribute>
+    <xsl:attribute name="padding-top">0.5em</xsl:attribute>
+    <xsl:attribute name="padding-left">0.5em</xsl:attribute>
+    <xsl:attribute name="padding-right">0.5em</xsl:attribute>
+    <xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
+    <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+    <xsl:attribute name="margin-right">0.5em</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!-- Shade (background) programlistings -->
+  <xsl:param name="shade.verbatim">1</xsl:param>
+  <xsl:attribute-set name="shade.verbatim.style">
+    <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!--###################################################
+                           Callouts
+      ################################################### -->
+
+  <!-- Use images for callouts instead of (1) (2) (3) -->
+  <xsl:param name="callout.graphics">0</xsl:param>
+  <xsl:param name="callout.unicode">1</xsl:param>
+
+  <!-- Place callout marks at this column in annotated areas -->
+  <xsl:param name="callout.defaultcolumn">90</xsl:param>
+
+  <!--###################################################
+                         Admonitions
+      ################################################### -->
+
+  <!-- Use nice graphics for admonitions -->
+  <xsl:param name="admon.graphics">'1'</xsl:param>
+  <xsl:param name="admon.graphics.path">&admon_gfx_path;</xsl:param>
+
+  <!--###################################################
+                            Misc
+      ################################################### -->
+
+  <!-- Placement of titles -->
+  <xsl:param name="formal.title.placement">
+    figure after
+    example before
+    equation before
+    table before
+    procedure before
+  </xsl:param>
+
+  <!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
+  <xsl:param name="variablelist.as.blocks">1</xsl:param>
+
+  <!-- The horrible list spacing problems -->
+  <xsl:attribute-set name="list.block.spacing">
+    <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+  </xsl:attribute-set>
+
+  <!--###################################################
+                colored and hyphenated links
+      ################################################### -->
+  <xsl:template match="ulink">
+    <fo:basic-link external-destination="{@url}"
+                   xsl:use-attribute-sets="xref.properties"
+                   text-decoration="underline"
+                   color="blue">
+      <xsl:choose>
+        <xsl:when test="count(child::node())=0">
+          <xsl:value-of select="@url"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </fo:basic-link>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/common/src/main/resources/theme/master.css b/common/src/main/resources/theme/master.css
new file mode 100644
index 0000000..595a5f4
--- /dev/null
+++ b/common/src/main/resources/theme/master.css
@@ -0,0 +1,17 @@
+body {
+  font-family: sans-serif;
+}
+
+table.reference tbody tr {
+  border: solid thin black;
+}
+
+.literallayout {
+  margin-left: 20px;
+  font-family: monospace;
+  background-color: #E0E0E0;
+}
+
+.legalnotice {
+  font-size: 0.8em;
+}
\ No newline at end of file
diff --git a/docs/jbi/pom.xml b/docs/jbi/pom.xml
new file mode 100644
index 0000000..147b055
--- /dev/null
+++ b/docs/jbi/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>docs</artifactId>
+    <groupId>org.apache.servicemix.docs</groupId>
+    <version>4.2.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.servicemix.docs</groupId>
+  <artifactId>jbi</artifactId>
+  <packaging>pom</packaging>
+  <name>Apache ServiceMix :: Documentation :: JBI Reference Manual</name>
+
+  <properties>
+    <servicemix-saxon-source>components/engines/servicemix-saxon/trunk</servicemix-saxon-source>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.servicemix</groupId>
+                  <artifactId>servicemix-bean</artifactId>
+                  <version>${components.version}</version>
+                  <type>xsd</type>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.apache.servicemix</groupId>
+                  <artifactId>servicemix-saxon</artifactId>
+                  <version>${components.version}</version>
+                  <type>xsd</type>
+                </artifactItem>
+              </artifactItems>
+              <outputDirectory>${project.build.directory}/src/main/xsd</outputDirectory>
+              <stripVersion>true</stripVersion>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>xml-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>transform</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <transformationSets>
+            <transformationSet>
+              <dir>${project.build.directory}/src/main/xsd</dir>
+              <stylesheet>src/main/xslt/xbean-xsd.xsl</stylesheet>
+              <outputDir>${project.build.directory}/docbkx/sources/appendix</outputDir>
+              <fileMappers>
+                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
+                  <targetExtension>.xml</targetExtension>
+                </fileMapper>
+              </fileMappers>
+            </transformationSet>
+          </transformationSets>
+        </configuration>
+      </plugin>
+
+
+      <plugin>
+        <groupId>com.agilejava.docbkx</groupId>
+        <artifactId>docbkx-maven-plugin</artifactId>
+        <version>2.0.9</version>
+        <configuration>
+          <entities>
+            <entity>
+              <name>servicemix-saxon-source</name>
+              <value>components/engines/servicemix-saxon/trunk</value>
+            </entity>
+            <entity>
+              <name>servicemix-bean-source</name>
+              <value>components/engines/servicemix-bean/trunk</value>
+            </entity>
+          </entities>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/docs/jbi/src/docbkx/index.xml b/docs/jbi/src/docbkx/index.xml
new file mode 100644
index 0000000..5f1ae2c
--- /dev/null
+++ b/docs/jbi/src/docbkx/index.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+  <bookinfo>
+    <title>Apache ServiceMix</title>
+    <subtitle>JBI Reference Manual</subtitle>
+    <releaseinfo>${version}</releaseinfo>
+
+    <authorgroup>
+      <corpauthor>Apache ServiceMix Community</corpauthor>
+    </authorgroup>
+
+    <legalnotice>
+      <para>Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements. See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership. The
+      ASF licenses this file to You under the Apache License, Version 2.0 (the
+      "License"); you may not use this file except in compliance with the
+      License. You may obtain a copy of the License at</para>
+
+      <para>http://www.apache.org/licenses/LICENSE-2.0</para>
+
+      <para>Unless required by applicable law or agreed to in writing,
+      software distributed under the License is distributed on an "AS IS"
+      BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied. See the License for the specific language governing permissions
+      and limitations under the License.</para>
+    </legalnotice>
+  </bookinfo>
+
+  <toc></toc>
+
+  <part>
+    <title>ServiceMix JBI Components</title>
+    <xi:include href="servicemix-bean.xml" parse="xml"/>
+    <xi:include href="servicemix-saxon.xml" parse="xml"/>
+
+
+    <chapter>
+      <title>Test snippets</title>
+      <xi:include href="snippet://&servicemix-bean-source;/src/test/java/org/apache/servicemix/bean/beans/AnnotatedBean.java"/>
+    </chapter>
+
+  </part>
+
+
+
+  <appendix>
+    <title>JBI Component XSD reference</title>
+    <xi:include href="appendix/servicemix-bean.xml" parse="xml"/>
+    <xi:include href="appendix/servicemix-saxon.xml" parse="xml" />
+  </appendix>
+  
+</book>
\ No newline at end of file
diff --git a/docs/jbi/src/docbkx/servicemix-bean.xml b/docs/jbi/src/docbkx/servicemix-bean.xml
new file mode 100644
index 0000000..98b7e67
--- /dev/null
+++ b/docs/jbi/src/docbkx/servicemix-bean.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" >
+<chapter>
+<title>servicemix-bean</title>
+
+<section>
+  <title>Overview</title>
+  <para>
+    The ServiceMix Bean component provides integration with beans (POJOs) with the JBI bus to make it easy to use POJOs to process JBI message exchanges. Like in an Message Driven Bean in J2EE a POJO will receive a message from the NMR and process it in any way it likes. Unlike in a JMS component where the coding is already done the Bean component gives the developer the freedom to create any type of message handling but it must be hand coded all the way.
+  </para>
+
+
+  <section>
+    <title>Namespace and xbean.xml</title>
+    <para>
+      The namespace URI for the servicemix-bean JBI component is <code>http://servicemix.apache.org/bean/1.0</code>.  This is an example of <filename>xbean.xml</filename> file with a namespace definition with prefix <code>bean</code>.
+    <programlisting><![CDATA[
+    <beans xmlns:bean="http://servicemix.apache.org/bean/1.0">
+
+      <!-- add bean:endpoint definitions here -->
+
+    </beans>
+    ]]></programlisting>
+    </para>
+
+  </section>
+
+  <section>
+    <title>Endpoint types</title>
+    <para>
+      The servicemix-bean component only defines one endpoint, called <code>bean:endpoint</code>.  It can be used to receive and send message exchanges from/to the NMR.
+    </para>
+  </section>
+
+</section>
+
+<section>
+  <title><code>Endpoint bean:endpoint</code></title>
+
+  <section>
+    <title>Using a Java class</title>
+
+    <para>
+      When definining a <code>bean:endpoint</code> specifying a Java class name, a new instance of this class will be created for handling a single message exchange.
+    </para>
+
+    <programlisting><![CDATA[
+    <beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
+           xmlns:my="urn:org:servicmix:docs:examples">
+
+      <bean:endpoint service="my:service" endpoint="endpoint"
+                     class="org.apache.servicemix.docs.bean.MyHandlerBean"/>
+
+    </beans>
+    ]]></programlisting>
+  </section>
+
+
+</section>
+
+<section>
+  <title>Sample configurations</title>
+  <para>
+    This section will list a whole set of sample configurations.
+  </para>
+</section>
+
+
+
+</chapter>
\ No newline at end of file
diff --git a/docs/jbi/src/docbkx/servicemix-saxon.xml b/docs/jbi/src/docbkx/servicemix-saxon.xml
new file mode 100644
index 0000000..50c89d0
--- /dev/null
+++ b/docs/jbi/src/docbkx/servicemix-saxon.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" >
+<chapter xmlns:xi="http://www.w3.org/2001/XInclude">
+<title>servicemix-saxon</title>
+
+<section>
+  <title>Overview</title>
+  <para>
+    The servicemix-saxon component is a standard JBI Service Engine for XSLT / XQuery. This component is based on Saxon and supports XSLT 2.0 and XPath 2.0, and XQuery 1.0.
+  </para>
+
+
+  <section>
+    <title>Namespace and xbean.xml</title>
+    <para>
+      The namespace URI for the servicemix-bean JBI component is <code>http://servicemix.apache.org/saxon/1.0</code>.  This is an example of <filename>xbean.xml</filename> file with a namespace definition with prefix <code>saxon</code>.
+    <programlisting><![CDATA[
+    <beans xmlns:saxon="http://servicemix.apache.org/saxon  /1.0">
+
+      <!-- add saxon:xslt, saxon:xquery or saxon:proxy definitions here -->
+
+    </beans>
+    ]]></programlisting>
+    </para>
+
+  </section>
+
+  <section>
+    <title>Endpoint types</title>
+    <para>
+      The servicemix-saxon component only defines three endpoints:
+      <glosslist>
+        <glossentry>
+          <glossterm><code>saxon:xslt</code></glossterm>
+          <glossdef>
+            <para>Translates the in message content using XSLT to send back the translated content in the out message</para>
+          </glossdef>
+        </glossentry>
+        <glossentry>
+          <glossterm><code>saxon:proxy</code></glossterm>
+          <glossdef>
+            <para>Acts as a proxy for an endpoint, translating the message passed to/from the endpoint using XSLT</para>
+          </glossdef>
+        </glossentry>
+        <glossentry>
+          <glossterm><code>saxon:xquery</code></glossterm>
+          <glossdef>
+            <para>Use xquery to extract parts of the XML</para>
+          </glossdef>
+        </glossentry>
+      </glosslist>
+    </para>
+  </section>
+
+</section>
+
+<section>
+  <title>Endpoint <code>saxon:xslt</code></title>
+
+  <xi:include href="snippet://${servicemix-saxon-source}/src/test/resources/spring.xml?id=xslt"/>
+
+</section>
+
+  <section>
+  <title>Sample configurations</title>
+  <para>
+    This section will list a whole set of sample configurations.
+  </para>
+
+</section>
+
+
+
+</chapter>
\ No newline at end of file
diff --git a/docs/jbi/src/main/xslt/xbean-xsd.xsl b/docs/jbi/src/main/xslt/xbean-xsd.xsl
new file mode 100644
index 0000000..2ccd7ab
--- /dev/null
+++ b/docs/jbi/src/main/xslt/xbean-xsd.xsl
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xsd='http://www.w3.org/2001/XMLSchema'
+                version="1.0">
+
+  <xsl:template match="xsd:schema">
+    <section>
+      <xsl:apply-templates select="xsd:element"/>
+    </section>
+  </xsl:template>
+
+  <xsl:template match="xsd:element[@name='component']">
+    <title>
+      <xsl:value-of select="xsd:annotation/xsd:documentation/text()"/>
+    </title>  
+  </xsl:template>
+
+  <xsl:template match="xsd:element">
+    <simplesect>
+      <title><xsl:value-of select="@name"/></title>
+      <para>
+        <xsl:value-of select="xsd:annotation/xsd:documentation/text()"/>
+      </para>
+      <para>
+      <table class="reference">
+        <caption>Attributes</caption>
+        <tbody>
+          <xsl:apply-templates select="xsd:complexType/xsd:attribute"/>
+        </tbody>        
+      </table>
+      </para>
+    </simplesect>
+  </xsl:template>
+
+  <xsl:template match="xsd:attribute">
+    <tr>
+      <td><xsl:value-of select="@name"/></td>
+      <td><xsl:value-of select="@type"/></td>
+    </tr>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/pom.xml b/docs/pom.xml
new file mode 100644
index 0000000..317b918
--- /dev/null
+++ b/docs/pom.xml
@@ -0,0 +1,176 @@
+<?xml version="1.0"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.servicemix.docs</groupId>
+    <artifactId>parent</artifactId>
+    <version>4.2.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>docs</artifactId>
+  <packaging>pom</packaging>
+  <name>Apache ServiceMix :: Documentation</name>
+  <description>Apache ServiceMix Documentation</description>
+
+  <modules>
+    <module>quickstart</module>
+    <module>jbi</module>
+  </modules>
+
+  <properties>
+    <docbkx.start.page>index.xml</docbkx.start.page>
+  </properties>
+
+  <build>
+
+    <resources>
+      <resource>
+        <targetPath>${project.build.directory}/docbkx/sources</targetPath>
+        <directory>${basedir}/src/docbkx</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+
+    <plugins>
+
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>resources</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+      
+      <!-- extract common files (stylesheets, ...) -->
+      <plugin>
+        <artifactId>maven-remote-resources-plugin</artifactId>
+        <version>1.1</version>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>process</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/common</outputDirectory>
+              <resourceBundles>
+                <resourceBundle>org.apache.servicemix.docs:common:${pom.version}</resourceBundle>
+              </resourceBundles>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- generate the HTML and PDF -->
+      <plugin>
+        <groupId>com.agilejava.docbkx</groupId>
+        <artifactId>docbkx-maven-plugin</artifactId>
+        <version>2.0.9</version>
+        <executions>
+          <execution>
+            <id>generate-html</id>
+            <goals>
+              <goal>generate-html</goal>
+            </goals>
+            <phase>verify</phase>
+            <configuration>
+              <htmlStylesheet>theme/master.css</htmlStylesheet>
+              <chunkToc>false</chunkToc>
+              <chunkedOutput>true</chunkedOutput>
+              <postProcess>
+                <property name="theme" location="${project.build.directory}/docbkx/html/theme"/>
+                <mkdir dir="${theme}"/>
+                <copy todir="${theme}">
+                  <fileset dir="${project.build.directory}/common/theme"/>
+                </copy>
+              </postProcess>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-pdf</id>
+            <goals>
+              <goal>generate-pdf</goal>
+            </goals>
+            <phase>verify</phase>
+            <configuration>
+              <foCustomization>${project.build.directory}/common/styles/docbook-fo.xsl</foCustomization>
+            </configuration>
+          </execution>
+        </executions>
+
+        <configuration>
+          <xincludeSupported>true</xincludeSupported>
+          <entities>
+            <entity>
+              <name>version</name>
+              <value>${servicemix-version}</value>
+            </entity>
+          </entities>
+
+          <sourceDirectory>${project.build.directory}/docbkx/sources</sourceDirectory>
+          <includes>${docbkx.start.page}</includes>
+        </configuration>
+
+        <dependencies>
+          <dependency>
+            <groupId>org.docbook</groupId>
+            <artifactId>docbook-xml</artifactId>
+            <version>4.4</version>
+            <scope>runtime</scope>
+          </dependency>
+          <dependency>
+            <groupId>net.sf.xslthl</groupId>
+            <artifactId>xslthl</artifactId>
+            <version>2.0.1</version>
+          </dependency>
+        </dependencies>
+
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.servicemix.docs</groupId>
+        <artifactId>tools</artifactId>
+        <version>${pom.version}</version>
+        <inherited>false</inherited>  <!-- URL handlers only have to be registered once -->
+        <executions>
+          <execution>
+            <phase>initialize</phase>
+            <goals>
+              <goal>snippet</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <snippetBase>http://svn.apache.org/repos/asf/servicemix/</snippetBase>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/docs/quickstart/pom.xml b/docs/quickstart/pom.xml
new file mode 100644
index 0000000..2e0591c
--- /dev/null
+++ b/docs/quickstart/pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.servicemix.docs</groupId>
+    <artifactId>docs</artifactId>
+    <version>4.2.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>quickstart</artifactId>
+  <packaging>pom</packaging>
+  <name>Apache ServiceMix :: Documentation :: Quickstart Guide</name>
+  <description>The ServiceMix Getting Started Guide</description>
+
+</project>
diff --git a/docs/quickstart/src/docbkx/index.xml b/docs/quickstart/src/docbkx/index.xml
new file mode 100644
index 0000000..7e8b8aa
--- /dev/null
+++ b/docs/quickstart/src/docbkx/index.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+  <bookinfo>
+    <title>Apache ServiceMix</title>
+    <subtitle>Quickstart Guide</subtitle>
+    <releaseinfo>&version;</releaseinfo>
+
+    <authorgroup>
+      <corpauthor>Apache ServiceMix Community</corpauthor>
+    </authorgroup>
+
+    <legalnotice>
+      <para>Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements. See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership. The
+      ASF licenses this file to You under the Apache License, Version 2.0 (the
+      "License"); you may not use this file except in compliance with the
+      License. You may obtain a copy of the License at</para>
+
+      <para>http://www.apache.org/licenses/LICENSE-2.0</para>
+
+      <para>Unless required by applicable law or agreed to in writing,
+      software distributed under the License is distributed on an "AS IS"
+      BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied. See the License for the specific language governing permissions
+      and limitations under the License.</para>
+    </legalnotice>
+  </bookinfo>
+
+  <toc></toc>
+
+  <xi:include href="installation.xml" parse="xml" />
+  <xi:include href="start.xml" parse="xml" />
+  
+</book>
\ No newline at end of file
diff --git a/docs/quickstart/src/docbkx/installation.xml b/docs/quickstart/src/docbkx/installation.xml
new file mode 100644
index 0000000..ea2b9c6
--- /dev/null
+++ b/docs/quickstart/src/docbkx/installation.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" >
+<chapter id="installation">
+<title>Installing ServiceMix</title>
+<para>Install ServiceMix and start it a first time.</para>
+
+<section id="prereqs">
+  <title>System requirements</title>
+  <para>
+    In order to function properly, Apache ServiceMix requires:
+    <itemizedlist>
+      <listitem>Java 5 JRE or higher</listitem>
+      <listitem>At least 200 MB free disk space</listitem>
+    </itemizedlist>
+  </para>
+</section>
+
+<section>
+  <title>Installation</title>
+  <para>
+    Download the appropriate archive for your platform:
+    <itemizedlist>
+      <listitem>apache-servicemix-&version;.tar.gz for Linux, Unix and Mac OS X</listitem>
+      <listitem>apache-servicemix-&version;.zip for Windows</listitem>
+    </itemizedlist>
+  </para>
+  <para>
+    Extract the archive on your hard disk.  Afterwards, you'll find this directory structure
+<literallayout>+- ant
++- bin
++- deploy
++- etc
++- examples
++- lib
+\- system
+</literallayout>
+  </para>
+</section>
+
+</chapter>
\ No newline at end of file
diff --git a/docs/quickstart/src/docbkx/start.xml b/docs/quickstart/src/docbkx/start.xml
new file mode 100644
index 0000000..52030d0
--- /dev/null
+++ b/docs/quickstart/src/docbkx/start.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" >
+<chapter>
+<title>Starting ServiceMix</title>
+<chapterinfo>
+  <abstract>How to start ServiceMix</abstract>
+</chapterinfo>
+
+<section>
+  <title>Start ServiceMix on Windows</title>
+  <para>
+    In order to function properly, Apache ServiceMix requires:
+    <itemizedlist>
+      <listitem>Java 5 JRE or higher</listitem>
+      <listitem>At least 200 MB free disk space</listitem>
+    </itemizedlist>
+  </para>
+</section>
+
+</chapter>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..bd1a09d
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.servicemix.docs</groupId>
+  <artifactId>parent</artifactId>
+  <packaging>pom</packaging>
+  <version>4.2.0-SNAPSHOT</version>
+  
+  <name>Apache ServiceMix (Documentation)</name>
+  <description>The ServiceMix reference documentation</description>
+
+  <properties>
+    <components.version>2010.01-SNAPSHOT</components.version>
+    <servicemix-version>4.2.0-SNAPSHOT</servicemix-version>
+  </properties>
+
+  <modules>
+    <module>common</module>
+    <module>docs</module>
+    <module>tools</module>
+  </modules>
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/tools/pom.xml b/tools/pom.xml
new file mode 100644
index 0000000..f94f4db
--- /dev/null
+++ b/tools/pom.xml
@@ -0,0 +1,33 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>parent</artifactId>
+    <groupId>org.apache.servicemix.docs</groupId>
+    <version>4.2.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  
+  <artifactId>tools</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>Apache Servicemix :: Tooling for documentation</name>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0.9</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.7</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/tools/src/main/java/org/apache/servicemix/docs/SnippetMojo.java b/tools/src/main/java/org/apache/servicemix/docs/SnippetMojo.java
new file mode 100644
index 0000000..ff82f8e
--- /dev/null
+++ b/tools/src/main/java/org/apache/servicemix/docs/SnippetMojo.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.docs;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.servicemix.docs.snippet.SnippetHandler;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLStreamHandler;
+import java.net.URLStreamHandlerFactory;
+
+/**
+ * Register a URL Handler to allow using snippet:// for pulling in code snippets from
+ * the SVN repository
+ *
+ * @goal snippet
+ * @phase initialize
+ */
+public class SnippetMojo extends AbstractMojo {
+
+    /**
+     * Location of the snippet cache
+     * @parameter default-value="${project.build.directory}/snippets"
+     */
+    protected File snippetCache;
+
+    /**
+     * @parameter @required
+     */
+    protected URL snippetBase;
+
+    private static URLStreamHandlerFactory factory = null;
+
+    public void execute() throws MojoExecutionException {
+        if (factory == null) {
+            getLog().info("Registering additional URL handlers (snippet://)");
+
+            factory = new URLStreamHandlerFactory() {
+
+                @Override
+                public URLStreamHandler createURLStreamHandler(String protocol) {
+                    if (protocol.equals("snippet")) {
+                        return new SnippetHandler(SnippetMojo.this, snippetCache, snippetBase);
+                    }
+                    return null;
+                }
+            };
+
+            URL.setURLStreamHandlerFactory(factory);
+        } else {
+            getLog().warn("Unable to register URL handlers more than once");
+        }
+    }
+}
diff --git a/tools/src/main/java/org/apache/servicemix/docs/snippet/SnippetHandler.java b/tools/src/main/java/org/apache/servicemix/docs/snippet/SnippetHandler.java
new file mode 100644
index 0000000..627d1e4
--- /dev/null
+++ b/tools/src/main/java/org/apache/servicemix/docs/snippet/SnippetHandler.java
@@ -0,0 +1,199 @@
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.docs.snippet;
+
+import java.io.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.maven.plugin.AbstractMojo;
+
+/**
+ * URLStreamHandler implementation for handling snippet:// URL
+ */
+public class SnippetHandler extends URLStreamHandler {
+
+    private static final String PROTOCOL = "snippet";
+    private static final String PREFIX = PROTOCOL + "://";
+
+    private AbstractMojo mojo;
+    private File cache;
+    private URL base;
+
+    public SnippetHandler(AbstractMojo mojo, File cache, URL base) {
+        super();
+        this.mojo = mojo;
+        this.cache = cache;
+        this.base = base;
+    }
+
+
+    @Override
+    protected URLConnection openConnection(final URL url) throws IOException {
+        if (!cache.exists()) {
+            mojo.getLog().debug("Creating cache directory " + cache);
+            cache.mkdirs();
+        }
+
+        final String name = getFileName(url);
+
+        final File cached = new File(cache, name);
+        if (!cached.exists()) {
+            cache(name);
+        } else {
+            mojo.getLog().debug("Using cached file " + cached.getAbsolutePath() + " for " + url.toExternalForm());
+        }
+
+        return new URLConnection(url) {
+
+            @Override
+            public void connect() throws IOException {
+                // graciously do nothing
+            }
+
+            @Override
+            public InputStream getInputStream() {
+                ByteArrayOutputStream bos = new ByteArrayOutputStream();
+                PrintWriter out = new PrintWriter(bos);
+                out.println("<programlisting><![CDATA[");
+
+                String id = getQuery(url, "id");
+                try {
+                    BufferedReader in = new BufferedReader(new FileReader(cached));
+                    if (id == null) {
+                        copy(in, out);
+                    } else {
+                        copy(in, out, id);
+                    }
+                } catch (IOException e) {
+                    mojo.getLog().warn("Unable to include snippet " + url.toExternalForm(), e);
+                }
+
+                out.println("]]></programlisting>");
+                out.flush();
+                out.close();
+    
+                return new ByteArrayInputStream(bos.toByteArray());       
+            }
+        };
+    }
+
+    private static final String getQuery(URL url, String key) {
+        return getQueryMap(url).get(key);
+    }
+
+    private static final Map<String, String> getQueryMap(URL url) {
+        Map<String, String> query = new HashMap<String, String>();
+
+        if (url.getQuery() != null) {
+            for (String param : url.getQuery().split("&")) {
+                String[] pair = param.split("=");
+                query.put(pair[0], pair[1]);
+            }
+        }
+
+        return query;
+    }
+
+    private String getFileName(URL url) {
+        String result = url.toExternalForm().substring(PREFIX.length());
+        if (url.getQuery() != null) {
+            result = result.replace("?" + url.getQuery(), "");
+        }
+        return result;
+    }
+
+    private void cache(String name) throws IOException {
+        URL source = getSourceUrl(name);
+
+        File target = new File(cache, name);
+
+        BufferedReader in = null;
+        PrintWriter out = null;
+        try {
+            if (!target.getParentFile().isDirectory()) {
+                target.getParentFile().mkdirs();
+            }
+
+            mojo.getLog().debug("Caching " + source.toExternalForm() + " in " + target.getAbsolutePath());
+
+            in =new BufferedReader(
+                        new InputStreamReader(source.openConnection().getInputStream()));
+            out = new PrintWriter(new FileWriter(target));
+
+            copy(in, out);
+            out.flush();
+        } catch (IOException e) {
+            mojo.getLog().warn("Unable to cache data for " + name, e);
+            throw e;
+        } finally {
+            if (in != null) {
+                in.close();
+            }
+            if (out != null) {
+                out.close();
+            }
+        }
+
+    }
+
+
+    private URL getSourceUrl(String name) throws MalformedURLException {
+        URL source;
+        if (base.toExternalForm().endsWith("/")) {
+            source = new URL(base.toExternalForm() + name);
+        } else {
+            source = new URL(base.toExternalForm() + "/" + name);
+        }
+        return source;
+    }
+
+    private void copy(BufferedReader in, PrintWriter out) throws IOException {
+
+        String inputLine;
+
+        while ((inputLine = in.readLine()) != null) {
+            out.println(inputLine);
+        }
+
+    }
+
+    private void copy(BufferedReader in, PrintWriter out, String id) throws IOException {
+        String line = in.readLine();
+        boolean snippet = false;
+
+        while (line != null) {
+            if (snippet) {
+                if (line.contains("END SNIPPET: " + id)) {
+                    break;
+                } else {
+                    out.println(line);
+                }
+            } else {
+                if (line.contains("START SNIPPET: " + id)) {
+                    snippet = true;
+                }
+            }
+            
+            line = in.readLine();
+        }
+
+    }    
+}
diff --git a/tools/src/test/java/org/apache/servicemix/docs/SnippetMojoTest.java b/tools/src/test/java/org/apache/servicemix/docs/SnippetMojoTest.java
new file mode 100644
index 0000000..9248913
--- /dev/null
+++ b/tools/src/test/java/org/apache/servicemix/docs/SnippetMojoTest.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.docs;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Test cases for {@link org.apache.servicemix.docs.SnippetMojo} and {@link org.apache.servicemix.docs.snippet.SnippetHandler}
+ */
+public class SnippetMojoTest {
+
+    private SnippetMojo mojo;
+
+    @Before
+    public void setUp() throws MojoExecutionException, MalformedURLException {
+        mojo = new SnippetMojo();
+        mojo.snippetCache = new File("target/tests/snippets-" + System.currentTimeMillis()); 
+        mojo.snippetBase = new File("src/test/resources").toURI().toURL();
+        mojo.execute();
+    }
+
+    @Test
+    public void getFullSource() throws IOException {
+        URL url = new URL("snippet://Test.java");
+        String content = read(url).trim();
+        
+        assertTrue(content.startsWith("<programlisting><![CDATA["));
+        assertTrue(content.contains("public class Test {"));
+        assertTrue(content.endsWith("]]></programlisting>"));
+    }
+
+    @Test
+    public void getSnippetFromSource() throws IOException {
+        URL url = new URL("snippet://Test.java?id=doSomething");
+        String content = read(url).trim();
+
+        assertTrue(content.startsWith("<programlisting><![CDATA["));
+        assertFalse(content.contains("public class Test {"));
+        assertTrue(content.contains("public void doSomething() {"));
+        assertTrue(content.endsWith("]]></programlisting>"));
+        
+        assertFalse(content.contains("<!-- BEGIN SNIPPET"));
+        assertFalse(content.contains("<!-- END SNIPPET"));
+    }
+
+    private String read(URL url) throws IOException {
+        InputStream is = null;
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
+        try {
+            is = url.openStream();
+            byte[] data = new byte[4096];
+            int read = is.read(data);
+            while (read > 0) {
+                bos.write(data, 0, read);
+                read = is.read(data);
+            }
+            bos.flush();
+            bos.close();
+            return new String(bos.toByteArray());
+        } finally {
+            if (is != null) {
+                is.close();
+            }
+        }
+    }
+}
diff --git a/tools/src/test/resources/Test.java b/tools/src/test/resources/Test.java
new file mode 100644
index 0000000..664e6e3
--- /dev/null
+++ b/tools/src/test/resources/Test.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * A simple Test class
+ */
+public class Test {
+
+    // START SNIPPET: doSomething
+    public void doSomething() {
+        // does something very interesting
+    }
+    // END SNIPPET: doSomething
+
+    public void doSomethingElse() {
+        // does something else, even more interesting
+    }
+    
+}
\ No newline at end of file