You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by bu...@apache.org on 2012/03/01 19:57:02 UTC

svn commit: r806928 [2/8] - in /websites/staging/maventest-doxia/trunk: ./ content/ content/book/ content/css/ content/developers/ content/doxia-example-book/ content/images/ content/images/logos/ content/issues/ content/macros/ content/modules/ conten...

Added: websites/staging/maventest-doxia/trunk/content/developers/sink.html
==============================================================================
--- websites/staging/maventest-doxia/trunk/content/developers/sink.html (added)
+++ websites/staging/maventest-doxia/trunk/content/developers/sink.html Thu Mar  1 18:57:00 2012
@@ -0,0 +1,272 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at Mar 1, 2012 -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Doxia Developers Centre</title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta name="author" content="Vincent Siveton" />
+        <meta name="Date-Creation-yyyymmdd" content="20080302" />
+    <meta name="Date-Revision-yyyymmdd" content="20120301" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                    </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../../" id="bannerLeft">
+                                                <img src="../images/apache-maven-project-2.png" alt="" />
+                </a>
+                                            <a href=".././" id="bannerRight">
+                                                <img src="../images/maven-logo-2.gif" alt="" />
+                </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+                  <a href="../index.html">Doxia</a>
+        &gt;
+    Doxia Developers Centre
+      </div>
+            <div class="xright">        
+                                 Last Published: 2012-03-01
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                <h5>About Doxia</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../index.html">What is Doxia?</a>
+            </li>
+                  <li class="none">
+                  <a href="../overview.html">Overview</a>
+            </li>
+                                                                                      <li class="collapsed">
+                  <a href="../upgrading.html">Upgrading</a>
+                  </li>
+                  <li class="none">
+                  <a href="../downloads.html">Downloads</a>
+            </li>
+                  <li class="none">
+                  <a href="../jira-report.html">Release Notes</a>
+            </li>
+                  <li class="none">
+                  <a href="../faq.html">FAQ</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                                                                                                                                <li class="collapsed">
+                  <a href="../references/index.html">Format References</a>
+                  </li>
+                  <li class="none">
+                  <a href="../modules/index.html">Doxia Modules Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../macros/index.html">Doxia Macros Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../book/index.html">Writing Books</a>
+            </li>
+                  <li class="none">
+                  <a href="../issues/index.html">Issues &amp; Gotchas</a>
+            </li>
+                  <li class="none">
+                  <a href="../resources.html">External Resources</a>
+            </li>
+          </ul>
+                       <h5>Developer Docs</h5>
+                  <ul>
+                                                                                                                  <li class="expanded">
+                  <a href="../developers/index.html">Developer Centre</a>
+                    <ul>
+                      <li class="none">
+                  <a href="../developers/modules.html">Create a Doxia Module</a>
+            </li>
+                      <li class="none">
+                  <a href="../developers/macros.html">Create a Doxia Macro</a>
+            </li>
+                      <li class="none">
+            <strong>Using the Sink API</strong>
+          </li>
+              </ul>
+        </li>
+                  <li class="none">
+                  <a href="../doxia/index.html">Doxia 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools/index.html">Doxia Sitetools 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-1.0.x/index.html">Doxia 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools-1.0.x/index.html">Doxia Sitetools 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-tools/index.html">Doxia Tools</a>
+            </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2</a>
+            </li>
+                  <li class="none">
+                  <a href="../../mercury/index.html">Mercury</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../images/logos/maven-feather.png"/>
+        </a>
+                       
+                            </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <!-- 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. --><!-- NOTE: For help with the syntax of this file, see: --><!-- http://maven.apache.org/doxia/referen
 ces/apt-format.html --><div class="section"><h2>Using the Doxia Sink API<a name="Using_the_Doxia_Sink_API"></a></h2><ul><li><a href="#Transforming_documents">Transforming documents</a></li><li><a href="#Generating_documents">Generating documents</a></li><li><a href="#Passing_attributes_to_Sink_events">Passing attributes to Sink events</a></li><li><a href="#Avoid_sink.rawText">Avoid sink.rawText!</a></li><li><a href="#How_to_inject_javascript_code_into_HTML">How to inject javascript code into HTML</a></li><li><a href="#References">References</a></li></ul><div class="section"><h3><a name="Transforming_documents">Transforming documents</a></h3><p>Doxia can be used to transform an arbitrary input document to any supported output format. The following snippet shows how to use a Doxia <i>Parser</i> to transform an apt file to html:</p><div class="source"><pre>  File userDir = new File( System.getProperty ( &quot;user.dir&quot; ) );
+  File inputFile = new File( userDir, &quot;test.apt&quot; );
+  File outputFile = new File( userDir, &quot;test.html&quot; );
+
+  SinkFactory sinkFactory = (SinkFactory) lookup( SinkFactory.ROLE, &quot;html&quot; ); // Plexus lookup
+
+  Sink sink = sinkFactory.createSink( outputFile.getParentFile(), outputFile.getName() ) );
+
+  Parser parser = (AptParser) lookup( Parser.ROLE, &quot;apt&quot; ); // Plexus lookup
+
+  Reader reader = ReaderFactory.newReader( inputFile, &quot;UTF-8&quot; );
+
+  parser.parse( reader, sink );</pre></div><p>It is recommended that you use <a class="externalLink" href="http://plexus.codehaus.org/">Plexus</a> to look up the parser. In principle you could instantiate the parser directly ( <tt>Parser parser = new AptParser();</tt> ) but then some special features like macros will not be available.</p><p>You could also use the <a class="externalLink" href="http://maven.apache.org/doxia/doxia-tools/doxia-converter/index.html">Doxia Converter Tool</a> to parse a given file/dir to another file/dir.</p></div><div class="section"><h3><a name="Generating_documents">Generating documents</a></h3><p>The snippet below gives a simple example of how to generate a document using the Doxia Sink API.</p><div class="source"><pre>    /**
+     * Generate a simple document and emit it
+     * into the specified sink. The sink is flushed but not closed.
+     *
+     * @param sink The sink to receive the events.
+     */
+    public static void generate( Sink sink )
+    {
+        sink.head();
+
+        sink.title();
+        sink.text( &quot;Title&quot; );
+        sink.title_();
+
+        sink.author();
+        sink.text( &quot;Author&quot; );
+        sink.author_();
+
+        sink.date();
+        sink.text( &quot;Date&quot; );
+        sink.date_();
+
+        sink.head_();
+
+
+        sink.body();
+
+        sink.paragraph();
+        sink.text( &quot;A paragraph of text.&quot; );
+        sink.paragraph_();
+
+        sink.section1();
+        sink.sectionTitle1();
+        sink.text( &quot;Section title&quot; );
+        sink.sectionTitle1_();
+
+        sink.paragraph();
+        sink.text( &quot;Paragraph in section.&quot; );
+        sink.paragraph_();
+
+        sink.section1_();
+
+        sink.body_();
+
+        sink.flush();
+    }</pre></div><p>A more complete example that also shows the 'canonical' order of events to use when generating a document, can be found in the Doxia <a href="./doxia/doxia-core/xref-test/org/apache/maven/doxia/sink/SinkTestDocument.html">SinkTestDocument</a> class.</p></div><div class="section"><h3><a name="Passing_attributes_to_Sink_events">Passing attributes to Sink events</a></h3><p>With Doxia 1.1 a number of methods have been added to the Sink API that allow to pass a set of attributes to many sink events. A typical use case would be:</p><div class="source"><pre>SinkEventAttributeSet atts = new SinkEventAttributeSet();
+atts.addAttribute( SinkEventAttributes.ALIGN, &quot;center&quot; );
+
+sink.paragraph( atts );</pre></div><p>What kind of attributes are supported depends on the event and the sink implementation. The sink API specifies a list of suggested attribute names that sinks are expected to recognize, and parsers are expected to use preferably when emitting events.</p></div><div class="section"><h3><a name="Avoid_sink.rawText">Avoid sink.rawText!</a></h3><p>In <b>Doxia 1.0</b> it was a common practice to use sink.rawText() to generate elements that were not supported by the Sink API. For example, the following snippet could be used to generate a styled HTML &lt;div&gt; block:</p><div class="source"><pre>sink.RawText( &quot;&lt;div style=\&quot;cool\&quot;&gt;&quot; );
+sink.text( &quot;A text with a cool style.&quot; );
+sink.rawText( &quot;&lt;/div&gt;&quot; );</pre></div><p>This has a major drawback however: it only works if the receiving Sink is a HTML Sink. In other words, the above method will not work for target documents in any other format than HTML (think of the FO Sink to generate a pdf, or a LaTeX sink,...).</p><p>In <b>Doxia 1.1</b> a new method unknown() was added to the Sink API that can be used to emit an arbitrary event without making special assumptions about the receiving Sink. Depending on the parameters, a Sink may decide whether or not to process the event, emit it as raw text, as a comment, log it, etc.</p><p>The correct way to generate the above &lt;div&gt; block is now:</p><div class="source"><pre>SinkEventAttributeSet atts = new SinkEventAttributeSet();
+atts.addAttribute( SinkEventAttributes.STYLE, &quot;cool&quot; );
+
+sink.unknown( &quot;div&quot;, new Object[]{new Integer( HtmlMarkup.TAG_TYPE_START )}, atts );
+sink.text( &quot;A text with a cool style.&quot; );
+sink.unknown( &quot;div&quot;, new Object[]{new Integer( HtmlMarkup.TAG_TYPE_END )}, null );</pre></div><p>Read the javadocs of the unknown() method in the <a href="./doxia/doxia-sink-api/apidocs/org/apache/maven/doxia/sink/Sink.html">Sink</a> interface and the <a href="./doxia/doxia-core/apidocs/org/apache/maven/doxia/sink/XhtmlBaseSink.html">XhtmlbaseSink</a> for information on the method parameters. Note that an arbitrary sink may be expected to ignore the unknown event completely!</p><p><b>In general, the rawText method should be avoided alltogether when emitting events into an arbitrary Sink.</b></p></div><div class="section"><h3><a name="How_to_inject_javascript_code_into_HTML">How to inject javascript code into HTML</a></h3><p>Related to the above, here is the correct way of injecting a javascript snippet into a Sink:</p><div class="source"><pre>// the javascript code is emitted within a commented CDATA section
+// so we have to start with a newline and comment the CDATA closing in the end
+// note that the sink will replace the newline by the system EOL
+String javascriptCode = &quot;\n function javascriptFunction() {...} \n //&quot;;
+
+SinkEventAttributeSet atts = new SinkEventAttributeSet();
+atts.addAttribute( SinkEventAttributes.TYPE, &quot;text/javascript&quot; );
+
+sink.unknown( &quot;script&quot;, new Object[]{new Integer( HtmlMarkup.TAG_TYPE_START )}, atts );
+sink.unknown( &quot;cdata&quot;, new Object[]{new Integer( HtmlMarkup.CDATA_TYPE ), javascriptCode }, null );
+sink.unknown( &quot;script&quot;, new Object[]{new Integer( HtmlMarkup.TAG_TYPE_END )}, null );</pre></div></div><div class="section"><h3><a name="References">References</a></h3><ul><li><a href="../modules/index.html">Doxia Modules Guide</a></li><li><a href="../macros/index.html">Doxia Macros Guide</a></li><li><a href="../doxia/apidocs/index.html">Doxia API Reference</a></li><li><a href="../doxia-sitetools/apidocs/index.html">Doxia Sitetools API Reference</a></li></ul></div></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2005-2012
+              The Apache Software Foundation
+            
+                       - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: websites/staging/maventest-doxia/trunk/content/downloads.html
==============================================================================
--- websites/staging/maventest-doxia/trunk/content/downloads.html (added)
+++ websites/staging/maventest-doxia/trunk/content/downloads.html Thu Mar  1 18:57:00 2012
@@ -0,0 +1,184 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at Mar 1, 2012 -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Download</title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+        <meta name="author" content="Vincent Siveton" />
+        <meta name="Date-Creation-yyyymmdd" content="20090302" />
+    <meta name="Date-Revision-yyyymmdd" content="20120301" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                    </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../" id="bannerLeft">
+                                                <img src="images/apache-maven-project-2.png" alt="" />
+                </a>
+                                            <a href="./" id="bannerRight">
+                                                <img src="images/maven-logo-2.gif" alt="" />
+                </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../index.html">Maven</a>
+        &gt;
+                  <a href="index.html">Doxia</a>
+        &gt;
+    Download
+      </div>
+            <div class="xright">        
+                                 Last Published: 2012-03-01
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                <h5>About Doxia</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="index.html">What is Doxia?</a>
+            </li>
+                  <li class="none">
+                  <a href="overview.html">Overview</a>
+            </li>
+                                                                                      <li class="collapsed">
+                  <a href="upgrading.html">Upgrading</a>
+                  </li>
+                  <li class="none">
+            <strong>Downloads</strong>
+          </li>
+                  <li class="none">
+                  <a href="jira-report.html">Release Notes</a>
+            </li>
+                  <li class="none">
+                  <a href="faq.html">FAQ</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                                                                                                                                <li class="collapsed">
+                  <a href="references/index.html">Format References</a>
+                  </li>
+                  <li class="none">
+                  <a href="modules/index.html">Doxia Modules Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="macros/index.html">Doxia Macros Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="book/index.html">Writing Books</a>
+            </li>
+                  <li class="none">
+                  <a href="issues/index.html">Issues &amp; Gotchas</a>
+            </li>
+                  <li class="none">
+                  <a href="resources.html">External Resources</a>
+            </li>
+          </ul>
+                       <h5>Developer Docs</h5>
+                  <ul>
+                                                                                                        <li class="collapsed">
+                  <a href="developers/index.html">Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="doxia/index.html">Doxia 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="doxia-sitetools/index.html">Doxia Sitetools 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="doxia-1.0.x/index.html">Doxia 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="doxia-sitetools-1.0.x/index.html">Doxia Sitetools 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="doxia-tools/index.html">Doxia Tools</a>
+            </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../index.html">Maven 2</a>
+            </li>
+                  <li class="none">
+                  <a href="../mercury/index.html">Mercury</a>
+            </li>
+                  <li class="none">
+                  <a href="../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="./images/logos/maven-feather.png"/>
+        </a>
+                       
+                            </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <!-- 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. --><!-- NOTE: For help with the syntax of this file, see: --><!-- http://maven.apache.org/doxia/referen
 ces/apt-format.html --><div class="section"><h2>Maven Doxia Releases<a name="Maven_Doxia_Releases"></a></h2><p>Releases of Maven Doxia are made available in both binary and source distributions. Individual JARs are also made available through Apache Maven repositories.</p><p>Releases of all Doxia sub-projects (currently Doxia, Doxia Sitetools and Doxia Tools) may be downloaded from Maven's central repository:</p><ul><li><a class="externalLink" href="http://repo2.maven.org/maven2/org/apache/maven/doxia/">http://repo2.maven.org/maven2/org/apache/maven/doxia/</a></li></ul></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2005-2012
+              The Apache Software Foundation
+            
+                       - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: websites/staging/maventest-doxia/trunk/content/doxia-1.2.pdf
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/maventest-doxia/trunk/content/doxia-1.2.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Added: websites/staging/maventest-doxia/trunk/content/doxia-example-book/aegis-binding.html
==============================================================================
--- websites/staging/maventest-doxia/trunk/content/doxia-example-book/aegis-binding.html (added)
+++ websites/staging/maventest-doxia/trunk/content/doxia-example-book/aegis-binding.html Thu Mar  1 18:57:00 2012
@@ -0,0 +1,254 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at Mar 1, 2012 -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Aegis Binding</title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta name="author" content="XFire User&apos;s Guide" />
+        <meta name="Date-Revision-yyyymmdd" content="20120301" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                    </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../../" id="bannerLeft">
+                                                <img src="../images/apache-maven-project-2.png" alt="" />
+                </a>
+                                            <a href=".././" id="bannerRight">
+                                                <img src="../images/maven-logo-2.gif" alt="" />
+                </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+                  <a href="../index.html">Doxia</a>
+        &gt;
+    Aegis Binding
+      </div>
+            <div class="xright">        
+                                 Last Published: 2012-03-01
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                <h5>About Doxia</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../index.html">What is Doxia?</a>
+            </li>
+                  <li class="none">
+                  <a href="../overview.html">Overview</a>
+            </li>
+                                                                                      <li class="collapsed">
+                  <a href="../upgrading.html">Upgrading</a>
+                  </li>
+                  <li class="none">
+                  <a href="../downloads.html">Downloads</a>
+            </li>
+                  <li class="none">
+                  <a href="../jira-report.html">Release Notes</a>
+            </li>
+                  <li class="none">
+                  <a href="../faq.html">FAQ</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                                                                                                                                <li class="collapsed">
+                  <a href="../references/index.html">Format References</a>
+                  </li>
+                  <li class="none">
+                  <a href="../modules/index.html">Doxia Modules Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../macros/index.html">Doxia Macros Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../book/index.html">Writing Books</a>
+            </li>
+                  <li class="none">
+                  <a href="../issues/index.html">Issues &amp; Gotchas</a>
+            </li>
+                  <li class="none">
+                  <a href="../resources.html">External Resources</a>
+            </li>
+          </ul>
+                       <h5>Developer Docs</h5>
+                  <ul>
+                                                                                                        <li class="collapsed">
+                  <a href="../developers/index.html">Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="../doxia/index.html">Doxia 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools/index.html">Doxia Sitetools 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-1.0.x/index.html">Doxia 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools-1.0.x/index.html">Doxia Sitetools 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-tools/index.html">Doxia Tools</a>
+            </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2</a>
+            </li>
+                  <li class="none">
+                  <a href="../../mercury/index.html">Mercury</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../images/logos/maven-feather.png"/>
+        </a>
+                       
+                            </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2></h2><!-- Navigation Panel --><table class="bodyTable" width="100%" align="center" border="0"><tr class="a"><td align="left">Previous: <a href="bindings.html">Bindings Overview</a></td><td align="center">Up: <a href="bind.html">Bindings</a></td><td align="right">Next: <a href="castor.html">Castor</a></td></tr></table><!-- End of Navigation Panel --><hr /></div><div class="section"><h2>Aegis Binding<a name="Aegis_Binding"></a></h2><p>Aegis is the default XFire binding which maps XML to POJOs. It supports code first development only at this point - i.e. you write your service in POJOs and it will generate the XML schema/wsdl for you.</p></div><div class="section"><h2>XML and Annotation Mapping Overview<a name="XML_and_Annotation_Mapping_Overview"></a></h2><p>Aegis has a flexible mapping system so you can control how your beans are controlled. By default your POJOs are serialized based on their name and namespaces. If you have a class in the &qu
 ot;org.codehaus.xfire&quot; package named &quot;Employee&quot; it would be serialized in namespace &quot;http://xfire.codehaus.org&quot; with the local name &quot;YourBean.&quot;</p><p>Fore example, the java class:</p><div class="source"><pre>public class Employee
+{
+  private String name;
+  private String title;
+
+  public String getName() { return name; }
+  public void setName(String name) { this.name = name; }
+
+  public String getTitle() { return title; }
+  public void setTitle(String title) { this.title = title; }
+}</pre></div><p>In XML this translates to:</p><div class="source"><pre>&lt;Employee xmlns=&quot;http://xfire.codehaus.org&quot;&gt;
+  &lt;name&gt;Santa Claus&lt;/name&gt;
+  &lt;title&gt;Chief Present Officer (CPO)&lt;/title&gt;
+&lt;/Employee&gt;</pre></div><p>In XML Schema this would become a complex type:</p><div class="source"><pre>&lt;xsd:complexType name=&quot;Employee&quot;&gt;
+  &lt;xsd:sequence&gt;
+    &lt;xsd:element name=&quot;name&quot; type=&quot;xsd:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1/&gt;
+    &lt;xsd:element name=&quot;title&quot; type=&quot;xsd:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1/&gt;
+  &lt;/xsd:sequence&gt;
+&lt;/xsd:complexType&gt;</pre></div><p><i>Validate your mapping!</i> You can find an XML Schema for Aegis mapping files <a class="externalLink" href="http://xfire.codehaus.org/schemas/1.0/mapping.xsd">here</a>.</p><div class="section"><h3>Supported Types<a name="Supported_Types"></a></h3><ul><li>Basic types: int, double, float, long, byte[], short, String, BigDecimal</li><li>Arrays</li><li>Collections</li><li>Dates: java.util.Date, java.util.Calendar, java.sql.Timestamp, java.sql.Date, java.sql.Time</li><li>XML: org.w3c.dom.Docmument, org.jdom.Element, XMLStreamReader, Source</li><li>Complex types which are aggregations of the above</li></ul><p>If you have constructors defined in your Java beans, make sure a default constructor (i.e. no arguments) is also declared. (Aegis needs a no-argument contstructor to instantiate client Java classes.) Controlling Mappings with XML</p><p>Its easy to control how your service and its beans are mapped to xml. If you are using Java 5.0 skip
  straight down to that section otherwise read on to learn how to configure serialization via mapping files.</p><p>Mapping files must exist in the same package as your bean or service class on the class path. In the above example the mapping file would be named &quot;/org/codehaus/xfire/YourBean.aegis.xml&quot;, with the following format:</p><div class="source"><pre>&lt;mappings&gt;
+  &lt;mapping uri=&quot;&quot; name=&quot;&quot;&gt;
+    &lt;method name=&quot;methodName&quot;&gt;
+      &lt;return-type mappedName=&quot;&quot; componentType=&quot;&quot;/&gt;
+      &lt;parameter index=&quot;&quot; mappedName=&quot;&quot;/&gt;
+    &lt;/method&gt;
+    &lt;property name=&quot;&quot; mappedName=&quot;&quot; style=&quot;attribute|element&quot; componentType=&quot;&quot;/&gt;
+  &lt;/mapping&gt;
+&lt;/mappings&gt;</pre></div><p>Note that <tt> &lt;method&gt; </tt> is used to configure methods on your service and <i>property</i> is used to configure properties on your javabeans.</p><p>The above example highlights many of the possible elements, most are optional and the format encourages minimally specified mappings.</p></div></div><div class="section"><h2>Controlling Naming<a name="Controlling_Naming"></a></h2><p>Lets pretend that in the above example you would like the elements names to be capatilized and in the namespace &quot;urn:north-pole:operations&quot;. You could achieve this through a mapping file like so:</p><div class="source"><pre>&lt;mappings xmlns:np=&quot;urn:north-pole:operations&quot;&gt;
+  &lt;mapping name=&quot;np:Employee&quot;&gt;
+    &lt;property name=&quot;name&quot; mappedName=&quot;Name&quot;/&gt;
+    &lt;property name=&quot;title&quot; mappedName=&quot;Title&quot;/&gt;
+  &lt;/mapping&gt;
+&lt;/mappings&gt;</pre></div><p>Notice that the namespace was declared on the mappings element and then the prefix was used to specify the element QNames for the name/title properties.</p><p>This will result in a mapping like so:</p><div class="source"><pre>&lt;np:Employee xmlns:np=&quot;urn:north-pole:operations&quot;&gt;
+  &lt;np:Name&gt;Santa Claus&lt;/np:Name&gt;
+  &lt;np:Title&gt;Chief Present Officer (CPO)&lt;/np:Title&gt;
+&lt;/np:Employee&gt;</pre></div><div class="section"><h3>Ignoring properties<a name="Ignoring_properties"></a></h3><p>If you don't want to serialize a certain property it is easy to ignore it:</p><div class="source"><pre>&lt;mappings&gt;
+  &lt;mapping&gt;
+    &lt;property name=&quot;propertyName&quot; ignore=&quot;true&quot;/&gt;
+  &lt;/mapping&gt;
+&lt;/mappings&gt;</pre></div></div><div class="section"><h3>Handling Collections<a name="Handling_Collections"></a></h3><p>You undoubtedly use Collections in your code. Pre Java 5 it is impossible to determine the &quot;component type&quot; of a Collection by introspection. So you need to give Aegis some hints. For a service which returned a Collection of employees like so:</p><div class="source"><pre>public class EmployeeService
+{
+    Collection getEmployees(String id) { ... }
+}</pre></div><p>You would need to supply metadata which gave the component type in a mapping file like this one:</p><div class="source"><pre>&lt;mappings&gt;
+  &lt;mapping&gt;
+    &lt;method name=&quot;getEmployees&quot;&gt;
+      &lt;return-type componentType=&quot;org.codehaus.xfire.Employee&quot; /&gt;
+    &lt;/method&gt;
+  &lt;/mapping&gt;
+&lt;/mappings&gt;</pre></div></div><div class="section"><h3>Handling Maps<a name="Handling_Maps"></a></h3><p>Java Maps don't map well to XML Schema (no pun intended) because there is no Map concept in XML Schema so your clients. Maps are transformed to a collection of <a name="key_value">key, value</a> tuples instead. In addition to providing the type of the value, you must also provide Aegis with the type of the key:</p><div class="source"><pre>public class GiftService
+{
+    Map getGiftList() { /* returns a map of NiceChild =&gt; Present */ }
+}</pre></div><p>The mapping file should look like this:</p><div class="source"><pre>&lt;mappings&gt;
+  &lt;mapping&gt;
+    &lt;method name=&quot;getGiftList&quot;&gt;
+      &lt;return-type keyType=&quot;org.codehaus.xfire.NiceChild&quot; componentType=&quot;org.codehaus.xfire.Present&quot;&gt;
+    &lt;/method&gt;
+  &lt;/mapping&gt;
+&lt;/mappings&gt;</pre></div><p>This will generate the following type:</p><div class="source"><pre>&lt;xsd:complexType name=&quot;NiceChild2PresentMap&quot;&gt;
+  &lt;xsd:sequence&gt;
+    &lt;xsd:element name=&quot;entry&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
+      &lt;xsd:complexType&gt;
+        &lt;xsd:sequence&gt;
+          &lt;xsd:element name=&quot;key&quot; type=&quot;ns1:NiceChild&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
+          &lt;xsd:element name=&quot;value&quot; type=&quot;ns1:Present&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
+        &lt;/xsd:sequence&gt;
+      &lt;/xsd:complexType&gt;
+    &lt;/xsd:element&gt;
+  &lt;/xsd:sequence&gt;
+&lt;/xsd:complexType&gt;</pre></div></div></div><div class="section"><h2>Interfaces and Aegis<a name="Interfaces_and_Aegis"></a></h2><p>The Aegis binding will automatically create proxies for your interfaces when reading XML. So if you have an interface like this:</p><div class="source"><pre>public interface User {
+  public String getUsername();
+  public String getPasswrod();
+}</pre></div><p>It will then create its own implementation of User and provide a username and password from the XML. You can specify your implementation class (in 1.1+) by setting a property on your service:</p><div class="source"><pre>Service service = ...;
+service.setProperty(&quot;com.acme.User.implementation&quot;, &quot;com.acme.UserImpl&quot;);</pre></div></div><div class="section"><h2></h2><hr /><!-- Navigation Panel --><table class="bodyTable" width="100%" align="center" border="0"><tr class="a"><td align="left">Previous: <a href="bindings.html">Bindings Overview</a></td><td align="center">Up: <a href="bind.html">Bindings</a></td><td align="right">Next: <a href="castor.html">Castor</a></td></tr></table><!-- End of Navigation Panel --></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2005-2012
+              The Apache Software Foundation
+            
+                       - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: websites/staging/maventest-doxia/trunk/content/doxia-example-book/bind.html
==============================================================================
--- websites/staging/maventest-doxia/trunk/content/doxia-example-book/bind.html (added)
+++ websites/staging/maventest-doxia/trunk/content/doxia-example-book/bind.html Thu Mar  1 18:57:00 2012
@@ -0,0 +1,182 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at Mar 1, 2012 -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Bindings</title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta name="Date-Revision-yyyymmdd" content="20120301" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                    </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../../" id="bannerLeft">
+                                                <img src="../images/apache-maven-project-2.png" alt="" />
+                </a>
+                                            <a href=".././" id="bannerRight">
+                                                <img src="../images/maven-logo-2.gif" alt="" />
+                </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+                  <a href="../index.html">Doxia</a>
+        &gt;
+    Bindings
+      </div>
+            <div class="xright">        
+                                 Last Published: 2012-03-01
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                <h5>About Doxia</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../index.html">What is Doxia?</a>
+            </li>
+                  <li class="none">
+                  <a href="../overview.html">Overview</a>
+            </li>
+                                                                                      <li class="collapsed">
+                  <a href="../upgrading.html">Upgrading</a>
+                  </li>
+                  <li class="none">
+                  <a href="../downloads.html">Downloads</a>
+            </li>
+                  <li class="none">
+                  <a href="../jira-report.html">Release Notes</a>
+            </li>
+                  <li class="none">
+                  <a href="../faq.html">FAQ</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                                                                                                                                <li class="collapsed">
+                  <a href="../references/index.html">Format References</a>
+                  </li>
+                  <li class="none">
+                  <a href="../modules/index.html">Doxia Modules Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../macros/index.html">Doxia Macros Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../book/index.html">Writing Books</a>
+            </li>
+                  <li class="none">
+                  <a href="../issues/index.html">Issues &amp; Gotchas</a>
+            </li>
+                  <li class="none">
+                  <a href="../resources.html">External Resources</a>
+            </li>
+          </ul>
+                       <h5>Developer Docs</h5>
+                  <ul>
+                                                                                                        <li class="collapsed">
+                  <a href="../developers/index.html">Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="../doxia/index.html">Doxia 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools/index.html">Doxia Sitetools 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-1.0.x/index.html">Doxia 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools-1.0.x/index.html">Doxia Sitetools 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-tools/index.html">Doxia Tools</a>
+            </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2</a>
+            </li>
+                  <li class="none">
+                  <a href="../../mercury/index.html">Mercury</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../images/logos/maven-feather.png"/>
+        </a>
+                       
+                            </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2></h2><!-- Navigation Panel --><table border="0" class="bodyTable" width="100%" align="center"><tr class="a"><td><div align="left">Previous:<a href="index.html">Table Of Content</a></div></td><td><div align="center">Up: <a href="index.html">Table Of Content</a></div></td><td><div align="right">Next: <a href="bindings.html">Bindings Overview</a></div></td></tr></table><!-- End of Navigation Panel --><hr /></div><div class="section"><h2>Bindings<a name="Bindings"></a></h2><ul><li><a href="bindings.html">Bindings Overview</a><ul><li><a href="bindings.html#Bindings_Overview">Bindings Overview</a></li><li><a href="bindings.html#Using_another_binding">Using another binding</a></li><li><a href="bindings.html#Convenience_ServiceFactorys">Convenience ServiceFactorys</a></li><li><a href="bindings.html#The_MessageBinding">The MessageBinding</a></li></ul></li><li><a href="aegis-binding.html">Aegis Binding</a><ul><li><a href="aegis-binding.html#Aegis_Bindi
 ng">Aegis Binding</a></li><li><a href="aegis-binding.html#XML_and_Annotation_Mapping_Overview">XML and Annotation Mapping Overview</a></li><li><a href="aegis-binding.html#Controlling_Naming">Controlling Naming</a></li><li><a href="aegis-binding.html#Interfaces_and_Aegis">Interfaces and Aegis</a></li></ul></li><li><a href="castor.html">Castor</a><ul><li><a href="castor.html#Castor">Castor</a></li><li><a href="castor.html#Top-down_Approach_starting_with_XML_schema:">Top-down Approach (starting with XML schema):</a></li><li><a href="castor.html#Bottom-up_Approach_starting_with_Java_classes:">Bottom-up Approach (starting with Java classes):</a></li></ul></li></ul></div><div class="section"><h2></h2><hr /><!-- Navigation Panel --><table border="0" class="bodyTable" width="100%" align="center"><tr class="a"><td><div align="left">Previous:<a href="index.html">Table Of Content</a></div></td><td><div align="center">Up: <a href="index.html">Table Of Content</a></div></td><td><div alig
 n="right">Next: <a href="bindings.html">Bindings Overview</a></div></td></tr></table><!-- End of Navigation Panel --></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2005-2012
+              The Apache Software Foundation
+            
+                       - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: websites/staging/maventest-doxia/trunk/content/doxia-example-book/bindings.html
==============================================================================
--- websites/staging/maventest-doxia/trunk/content/doxia-example-book/bindings.html (added)
+++ websites/staging/maventest-doxia/trunk/content/doxia-example-book/bindings.html Thu Mar  1 18:57:00 2012
@@ -0,0 +1,197 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Generated by Apache Maven Doxia at Mar 1, 2012 -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Bindings Overview</title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta name="author" content="XFire User&apos;s Guide" />
+        <meta name="Date-Revision-yyyymmdd" content="20120301" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                    </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../../" id="bannerLeft">
+                                                <img src="../images/apache-maven-project-2.png" alt="" />
+                </a>
+                                            <a href=".././" id="bannerRight">
+                                                <img src="../images/maven-logo-2.gif" alt="" />
+                </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+                  <a href="../index.html">Doxia</a>
+        &gt;
+    Bindings Overview
+      </div>
+            <div class="xright">        
+                                 Last Published: 2012-03-01
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                <h5>About Doxia</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../index.html">What is Doxia?</a>
+            </li>
+                  <li class="none">
+                  <a href="../overview.html">Overview</a>
+            </li>
+                                                                                      <li class="collapsed">
+                  <a href="../upgrading.html">Upgrading</a>
+                  </li>
+                  <li class="none">
+                  <a href="../downloads.html">Downloads</a>
+            </li>
+                  <li class="none">
+                  <a href="../jira-report.html">Release Notes</a>
+            </li>
+                  <li class="none">
+                  <a href="../faq.html">FAQ</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                                                                                                                                <li class="collapsed">
+                  <a href="../references/index.html">Format References</a>
+                  </li>
+                  <li class="none">
+                  <a href="../modules/index.html">Doxia Modules Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../macros/index.html">Doxia Macros Guide</a>
+            </li>
+                  <li class="none">
+                  <a href="../book/index.html">Writing Books</a>
+            </li>
+                  <li class="none">
+                  <a href="../issues/index.html">Issues &amp; Gotchas</a>
+            </li>
+                  <li class="none">
+                  <a href="../resources.html">External Resources</a>
+            </li>
+          </ul>
+                       <h5>Developer Docs</h5>
+                  <ul>
+                                                                                                        <li class="collapsed">
+                  <a href="../developers/index.html">Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="../doxia/index.html">Doxia 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools/index.html">Doxia Sitetools 1.1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-1.0.x/index.html">Doxia 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-sitetools-1.0.x/index.html">Doxia Sitetools 1.0.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../doxia-tools/index.html">Doxia Tools</a>
+            </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2</a>
+            </li>
+                  <li class="none">
+                  <a href="../../mercury/index.html">Mercury</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../images/logos/maven-feather.png"/>
+        </a>
+                       
+                            </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2></h2><!-- Navigation Panel --><table class="bodyTable" width="100%" align="center" border="0"><tr class="a"><td align="left">Previous: <a href="bind.html">Bindings</a></td><td align="center">Up: <a href="bind.html">Bindings</a></td><td align="right">Next: <a href="aegis-binding.html">Aegis Binding</a></td></tr></table><!-- End of Navigation Panel --><hr /></div><div class="section"><h2>Bindings Overview<a name="Bindings_Overview"></a></h2><p>Bindings are one of the most important pieces of XFire. They control how the incoming and outoing XML is mapped to objects.</p><p>The default binding in XFire is &quot;Aegis&quot;. Aegis means &quot;shield&quot;, and the point of it is to create a simple layer which makes going between objects and XML easy. Aegis also provides the layer which allows other bindings to integrate with XFire - like JAXB, XMLBeans and Castor.</p><p>Lets take a look at how you would use a different binding with XFire. The Bindi
 ngProvider class is the one for actually taking the xml streams and reading/writing to them. When we create a service we need to actually supply a BindingProvider to the service. In the simplest case of creating a service you're probably writing code like this:</p><div class="source"><pre>ServiceFactory factory = new ObjectServiceFactory();</pre></div><p>But, what this is actually doing in the constructor is creating an AegisBindingProvider:</p><div class="source"><pre> ServiceFactory factory = new ObjectServiceFactory(new AegisBindingProvider());</pre></div></div><div class="section"><h2>Using another binding<a name="Using_another_binding"></a></h2><p>This AegisBindingProvider has the concept of a TypeRegistry and TypeCreators (don't worry you don't need to know much about this), which create Type classes for you. Types serialize and deserialize java classes. When you use a different binding it actually provides a different TypeRegistry and TypeCreator for its types.</p><p>
 So if you were to create a JAXB 2.0 binding you would do:</p><div class="source"><pre>import org.codehaus.xfire.aegis.AegisBindingProvider;
+import org.codehaus.xfire.jaxb2.JaxbTypeRegistry;
+import org.codehaus.xfire.service.binding.ObjectServiceFactory;
+...
+
+ServiceFactory factory = new ObjectServiceFactory(new AegisBindingProvider(new JaxbTypeRegistry()));</pre></div><p>Each binding has a different type registry:</p><table class="bodyTable" border="1"><tr class="a" valign="top"><td align="left"><b>Binding</b></td><td align="left"><b>Type Registry</b></td></tr><tr class="b" valign="top"><td align="left">Default POJOs</td><td align="left">org.codehaus.xfire.aegis.DefaultTypeMappingRegistry</td></tr><tr class="a" valign="top"><td align="left">Castor</td><td align="left">org.codehaus.xfire.castor.CastorTypeMappingRegistry</td></tr><tr class="b" valign="top"><td align="left">JAXB 1.1</td><td align="left">org.codehaus.xfire.jaxb.JaxbTypeRegistry</td></tr><tr class="a" valign="top"><td align="left">JAXB 2.0</td><td align="left">org.codehaus.xfire.jaxb2.JaxbTypeRegistry</td></tr><tr class="b" valign="top"><td align="left">XMLBeans</td><td align="left">org.codehaus.xfire.xmlbeans.XmlBeansTypeRegistry</td></tr></table><p>But don't stop h
 ere, you can use these BindingProviders with different ServiceFactorys. Here is an example using JAXB 2.0 and the annotation service factory.</p><div class="source"><pre>import org.codehaus.xfire.aegis.AegisBindingProvider;
+import org.codehaus.xfire.jaxb2.JaxbTypeRegistry;
+import org.codehaus.xfire.service.binding.ObjectServiceFactory;
+...
+
+ServiceFactory factory = new AnnotationServiceFactory(new Jsr181WebAnnotations(),
+  new AegisBindingProvider(new JaxbTypeRegistry()));</pre></div></div><div class="section"><h2>Convenience ServiceFactorys<a name="Convenience_ServiceFactorys"></a></h2><p>If you just want to use the simple ObjectServiceFactory we have several convenience ServiceFactorys around:</p><table class="bodyTable" border="1"><tr class="a" valign="top"><td align="left"><b>Binding</b></td><td align="left"><b>Service Factory</b></td></tr><tr class="b" valign="top"><td align="left">JAXB 1.1</td><td align="left">org.codehaus.xfire.jaxb.JaxbServiceFactory</td></tr><tr class="a" valign="top"><td align="left">JAXB 2.0</td><td align="left">org.codehaus.xfire.jaxb2.JaxbServiceFactory</td></tr><tr class="b" valign="top"><td align="left">XMLBeans</td><td align="left">org.codehaus.xfire.xmlbeans.XmlBeansServiceFactory</td></tr></table><p>You can use these just like you would an ObjectServiceFactory:</p><div class="source"><pre>import org.codehaus.xfire.jaxb2.JaxbServiceFactory;
+import org.codehaus.xfire.service.ServiceFactory;
+...
+ServiceFactory factory = new JaxbServiceFactory();</pre></div></div><div class="section"><h2>The MessageBinding<a name="The_MessageBinding"></a></h2><p>There is also one other type of binding, the MessageBinding. The MessageBinding has special semantics to allow you to work with XML streams and fragments real easily. Read more on the Message Binding page.</p></div><div class="section"><h2></h2><hr /><!-- Navigation Panel --><table class="bodyTable" width="100%" align="center" border="0"><tr class="a"><td align="left">Previous: <a href="bind.html">Bindings</a></td><td align="center">Up: <a href="bind.html">Bindings</a></td><td align="right">Next: <a href="aegis-binding.html">Aegis Binding</a></td></tr></table><!-- End of Navigation Panel --></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2005-2012
+              The Apache Software Foundation
+            
+                       - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>