incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r794922 [2/4] - in /websites/staging/odftoolkit/trunk/content/odftoolkit: GSoC/ odfdom/ simple/
Date Thu, 25 Aug 2011 21:23:40 GMT
Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/Layers.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/Layers.html (added)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/Layers.html Thu Aug 25 21:23:39 2011
@@ -0,0 +1,227 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+<link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
+
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+</head>
+
+<body>
+  <div id="banner">
+   <!-- <div id="bannerleft"><a alt="Apache ODF Toolkit (incubating)" href="http://incubator.apache.org/odftoolkit/">
+      <img id="logo" alt="Apache ODF Toolkit (Incubating)" src="/odftoolkit/images/ooo-logo.png"/></a></div> -->
+    <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org">
+      <img id="asf-logo" alt="Apache Incubator" src="/odftoolkit/images/apache-incubator-logo.png"/></a></div>
+   <div id="bannercenter"><br/>&nbsp;&nbsp;&nbsp;&nbsp;Apache ODF Toolkit (incubating)</div>
+  </div>
+  <div id="clear"></div>
+  
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
+  
+    
+    <p><strong>TOC</strong></p>
+<p>=The ODFDOM Layers=</p>
+<p>The ODFDOM project's objective is to provide an easy API for reading, writing and manipulating documents of the OpenDocument format (ODF). 
+To archive this, the ODFDOM API follows a layered approach to access documents, as layered design is the robust foundation for a well-designed modular structure.</p>
+<p><center> [[image: ODFDOM-New-Layered-Model.png]]</center></p>
+<p>==The ODF Package Layer==
+The ODF Package Layer provides access to all resources stored within the ODF package, such as XML streams, images or embedded objects. 
+===The ODF Package API===
+The ODF Package API covers all features from the [http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part3.html third part of the ODF 1.2 specification] defining the ODF Package features. The ODF 1.2 package features are build on top technologies as [http://www.pkware.com/documents/APPNOTE/APPNOTE_6.2.0.txt ZIP package handling], [http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/ W3C encryption], [http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/ W3C signature] and [http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ W3C metadata].</p>
+<p>At this layer a document is in general represented by a bundle of named resources zipped to a package.
+For instance, an ODF text document like 'myVacation.odt' might contain the following files:</p>
+<p>[[image: ODF_Package.jpg]]</p>
+<p>'''Note:''' 
+All file streams aside of the '/Pictures' directory and its content are specified by the ODF standard. 
+Furthermore, the file streams are similar for all types of ODF documents.</p>
+<p>The main requirements for this layer in regard of ZIP are: 
+<em> Zip/unzip the file streams of the package
+</em> Enlist all file streams in the /META-INF/manifest.xml (similar to an inventory)
+* Begin the package with an unzipped 'mimetype' file stream (allowing others to easily identify the package)</p>
+<p>All sources of the Package layer are organized in ODFDOM beyond <code>org.odftoolkit.odfdom.pkg.*</code></p>
+<p>The following example illustrates how to add a graphic to the package level
+(although not shown by an ODF application (like OpenOffice.org), as not used by the shown content):</p>
+<pre>
+
+import org.odftoolkit.odfdom.pkg.OdfPackage;
+[...]
+
+// loads the ODF document package from the path
+OdfPackage pkg = OdfPackage.loadPackage("/home/myDocuments/myVacation.odt");
+
+// loads the image from the URL and inserts the image in the package, 
+// adapting the manifest
+pkg.insert(new URI("./myHoliday.png"), "Pictures/myHoliday.png", "image/png");
+pkg.save("/home/myDocuments/myVacation.odt");
+
+</pre>
+
+<br/>
+
+<p>==The ODF XML Layer==
+The ODF XML Layer provides all the features of an office format, such as tables, images, numbering etc. All features are defined in [http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part1.html the first part of the ODF 1.2 specification] describing the ODF XML schema. This layer consists of two APIs representing two different views on the features.</p>
+<p>===The ODF DOM API===
+The ODF DOM API gives access to the XML, the elemental parts of the ODF schema features. With this API it is easy to manipulate all specified XML nodes extending the platform and language independent DOM API [http://www.w3.org/DOM/ DOM API standardized by the W3C] - best-known by its implementation through the browsers. It extends the DOM API using a typed DOM. For every ODF XML element and ODF XML attribute defined by the ODF grammar (the RelaxNG schema) a unique class exists, providing methods for their allowed children. The purpose is to provide the user a corset to easily write valid ODF without consulting the spec constantly. This API is very consistent as instead of laboriously writing all these classes, the sources were generated directly from the ODF schema. This generation guarantees complete coverage of the ODF specification on one side and an easy and accurate upgrade to future ODF specifications on the other. </p>
+<p>At this level, all XML file streams of the document are accessible via the [http://www.w3.org/DOM/ W3C DOM API], but only the ODF standardized XML file streams of the document (e.g. content.xml, meta.xml) have their own classes representing their ODF XML elements. Foreign XML within a specified ODF XML file will remain in the document model in general and won't be neglected unless desired ( which still might be a future option).</p>
+<p>Example of the ODF XML representing a table in ODF:</p>
+<p>[[image: FruitTable_code.jpg]]</p>
+<p>'''Note:''' In the OpenDocument standard the ODF elements are reused among all document types. The above XML of a table is for instance equally usable in Text and Spreadsheet documents.</p>
+<p>This XML would be mapped to a W3C derived ODF DOM class structure:</p>
+<p>[[image: Table_fruits_diagramm.jpg | 670x346px]]</p>
+<p>All sources of the typed DOM API are organized beyond <code>org.odftoolkit.odfdom.dom.*</code></p>
+<p>The sources for the ODF elements are all generated from the ODF grammar (RelaxNG schema) using the following naming conventions in the Java reference implementation:
+<em> The class name is equal to the element local name using the Namespace as prefix and 'Element' as suffix (e.g. the 'draw:frame' element has the <code>DrawFrameElement</code> class). 
+</em> Elements are stored beyond a sub-package equal to their Namespace used by the OOo. Therefore the frame element 'draw:frame' would be generated in Java as class <code>org.odftoolkit.odfdom.dom.draw.DrawFrameElement</code>.</p>
+<p>'''Note:''' The element local names 'h' and 'p' have been renamed to the classes 'Heading' and 'Paragraph' for usability reasons.</p>
+<p>The following example illustrates how to add a graphic to the ODF document, that it is viewable:
+<pre></p>
+<p>import java.net.URI;
+import org.odftoolkit.odfdom.OdfElement;
+import org.odftoolkit.odfdom.doc.OdfDocument;
+import org.odftoolkit.odfdom.doc.OdfTextDocument;
+import org.odftoolkit.odfdom.doc.draw.OdfDrawImage;
+import org.odftoolkit.odfdom.dom.element.draw.DrawFrameElement;
+import org.odftoolkit.odfdom.dom.element.office.OfficeTextElement;
+import org.odftoolkit.odfdom.dom.element.text.TextPElement;</p>
+<p>[...]</p>
+<p>// Load file
+OdfTextDocument odt = (OdfTextDocument) OdfDocument.loadDocument("ImageIn.odt");</p>
+<p>// get root of all content of a text document
+OfficeTextElement officeText = odt.getContentRoot();</p>
+<p>// get first paragraph
+TextPElement firstParagraph = 
+  OdfElement.findFirstChildNode(TextPElement.class, officeText);</p>
+<p>// XPath alternative to get the first paragraph
+/<em>
+  XPath xpath = XPathFactory.newInstance().newXPath();
+  xpath.setNamespaceContext(new OdfNamespace());
+  OdfFileDom dom = odt.getContentDom();
+  firstParagraph = (TextPElement) xpath.evaluate("//text:p[1]", dom, XPathConstants.NODE);
+</em>/</p>
+<p>// insert a frame
+DrawFrameElement frame = firstParagraph.newDrawFrameElement();</p>
+<p>// insert an image: This is a class from the Document API
+OdfDrawImage image = (OdfDrawImage) frame.newDrawImageElement();
+image.newImage(new URI("./MySampleImage.png"));</p>
+<p>// Save file
+odt.save("ImageOut.odt");
+</pre>
+<br/>
+Even in this example we had to refer to a class from the Document API. Otherwise our implementation had gotten quite long and complex. </p>
+<br/>
+
+<p>===The ODF Document API===</p>
+<p>The ODF Document API provides a different much more high level view on the ODF schema features. This API is concerned about usability, hiding all ODF XML implementation details from the user, covering frequent user scenarios. For example, changing the content of a certain spreadsheet cell (e.g. Add 'Hello World' to a spreadsheet cell positioned at 'B2'). While in the ODF DOM API in general each class represents an ODF XML node, here a class covers multiple underlying ODF XML elements (&amp; their attributes). Think of puzzle piece consisting of multiple smaller pieces. Therefore the typed DOM tree is being mapped to feature tree.</p>
+<p>As naming convention all sources of the ODF document functionality layer are organized beyond <code>org.odftoolkit.odfdom.doc.*</code>
+The name of a document class is in general similar as the root element from the XML layer feature, only there is the new prefix 'Odf' and the suffix 'Element' has been neglected.</p>
+<p>For example, the document class for a 'draw:frame' element would be represented in the ODFDOM Java reference implemenation as <code>org.odftoolkit.odfdom.doc.draw.OdfDrawFrame</code> class. Some classes of the Document API differ from this naming convention, e.g. OdfTextParagraph is the subclass of TextPElement. However by browsing the packages you will easily find the classes your looking for.</p>
+<p>'''Note:''' The Document API will change. The current inheritance between DOM and DOC elements does not fit any longer in the multiple elements to a single document feature (1:n) pattern. The first Document Object is the table <code>rg.odftoolkit.odfdom.doc.table.OdfTable</code>, others will follow soon.</p>
+<p>Again let's look at the previous code example for the DOM API: Remember all DOM element classes are abstract and we're really getting objects from the Document API: Even if <code>frame.newDrawFrameElement()</code> is defined to return the DOM class DrawFrameElement, it really returns the DOC subclass OdfDrawFrame. So it's always save to use explicit casting <code>OdfDrawFrame frame = (OdfDrawFrame) firstParagraph.newDrawFrameElement();</code>.</p>
+<p>However reworking the previous example would just make the code larger, since we're not using any of the document methods provided by the DOC subclasses. </p>
+<p>Here's an example for working with DOC classes, completely avoiding handling the DOM manually:</p>
+<pre>
+[...]
+// Load Image
+OdfTextDocument odt = (OdfTextDocument) OdfDocument.loadDocument("ImageIn.odt");
+
+// Play around with text
+odt.addText("When there is no paragraph, the text will be embedded in a new paragraph");
+odt.newParagraph("Create new paragraph");
+odt.addText("\nThis is a new line");
+
+// Insert Image and make last paragraph its anchor
+odt.newImage(new URI("./MySampleImage.png"));
+
+// Insert new spreadsheet as sub document into the package within directory  "myOdsDirectoryPath/"
+odt.insertDocument(OdfSpreadsheetDocument.newSpreadsheetDocument(), "myOdsDirectoryPath");
+
+// Save file
+odt.save("ImageOut.odt");
+</pre>
+
+<br/>
+
+<p style="margin: 15px 0px; text-align:center">Go on reading about [[Development|how to set up a building environment and where to get the source code]].</p>
+  </div>
+
+  <div id="footera">
+    <div id="poweredby">
+      <p><img src="/odftoolkit/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p>
+    </div>
+    <div id="copyrighta">
+      <p>
+	Apache "ODF Toolkit" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+	Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and
+	decision making process	have stabilized in a manner consistent with other successful ASF projects. While incubation status is
+	not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has
+	yet to be fully endorsed by the ASF.</p>
+      <p>
+	Copyright &copy; 2011 The Apache Software Foundation Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+	<a href="/openofficeorg/contact.html">Contact Us</a>
+	<br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+	<br />Other names appearing on the site may be trademarks of their respective owners.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/MavenRepository.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/MavenRepository.html (added)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/MavenRepository.html Thu Aug 25 21:23:39 2011
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+<link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
+
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+</head>
+
+<body>
+  <div id="banner">
+   <!-- <div id="bannerleft"><a alt="Apache ODF Toolkit (incubating)" href="http://incubator.apache.org/odftoolkit/">
+      <img id="logo" alt="Apache ODF Toolkit (Incubating)" src="/odftoolkit/images/ooo-logo.png"/></a></div> -->
+    <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org">
+      <img id="asf-logo" alt="Apache Incubator" src="/odftoolkit/images/apache-incubator-logo.png"/></a></div>
+   <div id="bannercenter"><br/>&nbsp;&nbsp;&nbsp;&nbsp;Apache ODF Toolkit (incubating)</div>
+  </div>
+  <div id="clear"></div>
+  
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
+  
+    
+    <p>=== Maven Repository ===</p>
+<p>We have an interim maven repository. So far, all that is deployed in it are the artifacts for the code generator.</p>
+<p>To use this, you'll need something like the following:</p>
+<pre>
+ <repositories>
+    <repository>
+      <releases>
+        <enabled>false</enabled>
+        <updatePolicy>always</updatePolicy>
+        <checksumPolicy>fail</checksumPolicy>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+        <updatePolicy>never</updatePolicy>
+        <checksumPolicy>fail</checksumPolicy>
+      </snapshots>
+      <id>odfdom-snapshots</id>
+      <name>ODFDOM Snapshots</name>
+      <url>http://odftoolkit.org/svn/odfdom~maven2/snapshot/</url>
+      <layout>default</layout>
+    </repository>
+  </repositories>
+</pre>
+
+<p>You'll need the same thing in pluginRepositories to use the codegen-maven-plugin.</p>
+  </div>
+
+  <div id="footera">
+    <div id="poweredby">
+      <p><img src="/odftoolkit/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p>
+    </div>
+    <div id="copyrighta">
+      <p>
+	Apache "ODF Toolkit" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+	Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and
+	decision making process	have stabilized in a manner consistent with other successful ASF projects. While incubation status is
+	not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has
+	yet to be fully endorsed by the ASF.</p>
+      <p>
+	Copyright &copy; 2011 The Apache Software Foundation Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+	<a href="/openofficeorg/contact.html">Contact Us</a>
+	<br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+	<br />Other names appearing on the site may be trademarks of their respective owners.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/MultipleVersions.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/MultipleVersions.html (added)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/MultipleVersions.html Thu Aug 25 21:23:39 2011
@@ -0,0 +1,130 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+<link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
+
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+</head>
+
+<body>
+  <div id="banner">
+   <!-- <div id="bannerleft"><a alt="Apache ODF Toolkit (incubating)" href="http://incubator.apache.org/odftoolkit/">
+      <img id="logo" alt="Apache ODF Toolkit (Incubating)" src="/odftoolkit/images/ooo-logo.png"/></a></div> -->
+    <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org">
+      <img id="asf-logo" alt="Apache Incubator" src="/odftoolkit/images/apache-incubator-logo.png"/></a></div>
+   <div id="bannercenter"><br/>&nbsp;&nbsp;&nbsp;&nbsp;Apache ODF Toolkit (incubating)</div>
+  </div>
+  <div id="clear"></div>
+  
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
+  
+    
+    <p>= ODF Version Processing in ODFDOM =</p>
+<p>Hello everyone in this community!  I'm working on ODFDOM now. This is my first to write wiki. In the future, I'll have more issues about requirements, designs and implementation details to discuss with you. Now I  have a topic about ODF versions.</p>
+<ul>
+<li>
+<p>ODFDOM now only supports ODF 1.1, and surely we'll support ODF 1.2, also one of our team members is doing that now. But do we plan to support ODF 1.0? My opinion is that although ODF 1.0 is used in not many cases before,  ODF 1.0(2nd) is ISO standard ISO26300, so ODFDOM should consider the back compatible with ODF1.0, and can load/create ODF1.0 documents.  Of course, if we plan to do that, it should be done as early as possible. Welcome your opinion.</p>
+</li>
+<li>
+<p>ODFDOM should support all versions of ODF because in the practice, many ODF documents with different versions are mixed together, ODFDOM need to process them automatically for whatever ODF version. So a single code base should support all ODF versions instead of different code streams for different ODF versions.</p>
+</li>
+<li>
+<p>ODFDOM dom layer code have to support all elements and attributes defined in all ODF versions, that means it is a union set of all ODF versions.</p>
+</li>
+<li>
+<p>Generate different source code using different ODF schema, may modify the code generator source code</p>
+</li>
+<li>
+<p>Create a new code base that contain all ODF versions source files using some auto merge tools</p>
+</li>
+<li>
+<p>Identify the difference places in the source code for different ODF versions. Minor places are in dom layer, most places are in doc layer.</p>
+</li>
+<li>
+<p>Compare different ODF schemas, first do some automatic processing based on the assumption that ODF schema is back compatible completely. Then do some special processing for those elements or attributes that are not back compatible.</p>
+</li>
+</ul>
+<p>Welcome your suggestions.</p>
+  </div>
+
+  <div id="footera">
+    <div id="poweredby">
+      <p><img src="/odftoolkit/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p>
+    </div>
+    <div id="copyrighta">
+      <p>
+	Apache "ODF Toolkit" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+	Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and
+	decision making process	have stabilized in a manner consistent with other successful ASF projects. While incubation status is
+	not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has
+	yet to be fully endorsed by the ASF.</p>
+      <p>
+	Copyright &copy; 2011 The Apache Software Foundation Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+	<a href="/openofficeorg/contact.html">Contact Us</a>
+	<br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+	<br />Other names appearing on the site may be trademarks of their respective owners.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-Class-Structure.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-Class-Structure.html (added)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-Class-Structure.html Thu Aug 25 21:23:39 2011
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+<link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
+
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+</head>
+
+<body>
+  <div id="banner">
+   <!-- <div id="bannerleft"><a alt="Apache ODF Toolkit (incubating)" href="http://incubator.apache.org/odftoolkit/">
+      <img id="logo" alt="Apache ODF Toolkit (Incubating)" src="/odftoolkit/images/ooo-logo.png"/></a></div> -->
+    <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org">
+      <img id="asf-logo" alt="Apache Incubator" src="/odftoolkit/images/apache-incubator-logo.png"/></a></div>
+   <div id="bannercenter"><br/>&nbsp;&nbsp;&nbsp;&nbsp;Apache ODF Toolkit (incubating)</div>
+  </div>
+  <div id="clear"></div>
+  
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
+  
+    
+    <p><strong>TOC</strong></p>
+<p>=Class Structure in ODFDOM=
+The Java packages reflect the layers of the ODFDOM library.</p>
+<p>==Shared Functionality==</p>
+<p>Shared by all layers are the basic XML classes as in the <code>org.odftoolkit.odfdom</code> package, like
+;<code>OdfElement</code> 
+:parent of all ODFDOM elements
+;<code>OdfAttribute</code> 
+:parent of all ODFDOM attributes 
+;<code>OdfName</code> 
+:the union of an ODF local name and an ODF namespace, represented by 
+;<code>OdfNamespace</code> 
+:embracing all ODF namespaces (prefixes and URIs) defined in the specification.</p>
+<p>Similar used through all layers are the ODF datatypes, to be found in
+;<code>org.odftoolkit.odfdom.type</code>
+:All datatypes defined in the ODF 1.2 specification, mostly overtaken from W3C Schema types, like AnyURI.
+Helper functionality can be found at those types, like in case for AnyURI en/decode() methods.</p>
+<p>==The Package/Physical Layer==</p>
+<p>These classes are in the <code>org.odftoolkit.odfdom.pkg</code> package to access files from the ODF package.
+The classes you will find here include:</p>
+<p>;<code>OdfPackage</code>
+:Allows you to access, insert, delete, load, and save individual entries in a packaged ODF document.</p>
+<p>; <code>OdfPackageStream</code>
+:Allows you to write to a member of the ODF document as an output stream.</p>
+<p>;<code>OdfXMLHelper</code>
+:Provides utility methods to parse the XML content of a package member and apply an XSLT transformation to it.</p>
+<p>==The ODF Typed DOM / XML Layer==</p>
+<p>These classes are in general the generated DOM elements and attributes of ODF 1.2. 
+;<code>org.odftoolkit.odfdom.dom.element</code>
+:These classes give you access to the individual ODF elements. Its sub-packages are divided by namespace, so you would find the code for a <code>draw:ellipse</code> element in the <code>org.odftoolkit.odfdom.dom.element.draw.DrawEllipseElement</code> class.
+;<code>org.odftoolkit.odfdom.dom.attribute</code>
+:These classes give you access to the individual ODF attributes  (similar to the elements before). Again its sub-packages are divided by namespace, so you would find the code for a <code>xml:id</code> attribute in the <code>org.odftoolkit.odfdom.dom.attribute.xml.XmlId</code> class.</p>
+<p>The third package <code>org.odftoolkit.odfdom.dom.style</code> will vanish in the future (mostly parts will be moved to the DOC layer in an upcoming release).</p>
+<p>;<code>org.odftoolkit.odfdom.dom.style</code>
+:These classes and the <code>.props</code> sub-packages give you access to ODF&rsquo;s style families and their properties</p>
+<p>If you are using an IDE such as NetBeans or Eclipse, you don't have to memorize this hierarchy; the IDE can generate the proper <code>import</code> statements for you. </p>
+<p>The code in these classes is generated directly from the [http://www.relaxng.org/ Relax NG] (RNG) schema for ODF.</p>
+<p>==The ODF Document / Convenience Functionality Layer==</p>
+<p>This is the layer that developers will use most often. A sub-level like <code>org.odftoolkit.odfdom.doc.text</code> inherits (currently) from the elements of the <code>org.odftoolkit.odfdom.dom.element.text</code> package. Aside of the namespace prefix an 'Odf' prefix is being used in the beginning. Furthermore is the namespace prefix neglected in case it already exists in the local name. The convenient class for the ODF element <code>table:table</code>, which is represented in the DOM layer by <code>org.odftoolkit.odfdom.table.TableTableElement</code>, is OdfTable and NOT OdfTableTable.
+We encourage developers to create methods for these classes, based on actual use cases of the toolkit.</p>
+<p>The entry point for the convenient layer should be in the future the document itself. Some example functions had been added to <code>OdfTextDocument</code> to show this, like <code>newParagraph()</code>, adding a paragraph (ie. <code>text:p</code> element) at the end of the document.</p>
+  </div>
+
+  <div id="footera">
+    <div id="poweredby">
+      <p><img src="/odftoolkit/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p>
+    </div>
+    <div id="copyrighta">
+      <p>
+	Apache "ODF Toolkit" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+	Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and
+	decision making process	have stabilized in a manner consistent with other successful ASF projects. While incubation status is
+	not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has
+	yet to be fully endorsed by the ASF.</p>
+      <p>
+	Copyright &copy; 2011 The Apache Software Foundation Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+	<a href="/openofficeorg/contact.html">Contact Us</a>
+	<br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+	<br />Other names appearing on the site may be trademarks of their respective owners.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-Code-Generator.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-Code-Generator.html (added)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-Code-Generator.html Thu Aug 25 21:23:39 2011
@@ -0,0 +1,432 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+<link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
+
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+</head>
+
+<body>
+  <div id="banner">
+   <!-- <div id="bannerleft"><a alt="Apache ODF Toolkit (incubating)" href="http://incubator.apache.org/odftoolkit/">
+      <img id="logo" alt="Apache ODF Toolkit (Incubating)" src="/odftoolkit/images/ooo-logo.png"/></a></div> -->
+    <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org">
+      <img id="asf-logo" alt="Apache Incubator" src="/odftoolkit/images/apache-incubator-logo.png"/></a></div>
+   <div id="bannercenter"><br/>&nbsp;&nbsp;&nbsp;&nbsp;Apache ODF Toolkit (incubating)</div>
+  </div>
+  <div id="clear"></div>
+  
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
+  
+    
+    <p>=ODFDOM Code Generator=</p>
+<p>The ODFDOMCodeGenerator is a java application to create source code for elements and attributes that are defined using relaxng schema.
+It is used in the [[Home|ODFDOM]] project to generate the java source files for the elements available in the OpenDocument format.</p>
+<p>= Usage =</p>
+<p>To generate source code files, start the application with</p>
+<p>java -jar ODFDOMCodeGenerator.jar your-schema.rng your-config.xml your-template.xml /your/target/directory</p>
+<p>Please not, if you use the [[Home|ODFDOM]] project, you can change the setting 'gen-flat-odf-schema' inside the user.properties file
+to 'true' and the next build will use the 'schema/OpenDocument-schema-v1.1.rng' schema, the 'codegen/config.xml' config file,
+the 'codegen/javacodetemplate.xml' template file and the src directory of the project as the target directory. This will override
+all generated code files in your project.</p>
+<p>= The config file =</p>
+<p>The config file must be an xml file with the following structure</p>
+<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+  &lt;config&gt;
+  &lt;elements&gt;
+  &lt;element .../&gt;
+  &lt;element .../&gt;
+  ...
+  &lt;/elements&gt;
+  &lt;data-types&gt;
+  &lt;data .../&gt;
+  &lt;data .../&gt;
+  ...
+  &lt;/data-types&gt;
+  &lt;attributes&gt;
+  &lt;attribute .../&gt;
+  &lt;attribute .../&gt;
+  &lt;attribute .../&gt;
+  ...
+  &lt;/attributes&gt;
+  &lt;/config&gt;</p>
+<p>== Element ==</p>
+<p>The &lt;element&gt; element supports the following attributes</p>
+<p>=== Name ===</p>
+<p>The mandatory attribute 'name' selects the element from the relaxng schema with its qualified name (qname).</p>
+<p>=== Rename ===</p>
+<p>The optional attribute 'rename' changes the variable 'elementname' for this element.
+This can be used f.e. to give an element like &lt;text:a&gt; a more readable implementation name like &lt;text:anchor&gt;</p>
+<p>=== Base ===</p>
+<p>The optional attribute 'base' changes the variable 'elementbasename' for this element.</p>
+<p>=== Family ===</p>
+<p>The optional attribute 'family' changes the variable 'elementstylefamily' for this element.</p>
+<p>== Attribute ==</p>
+<p>The &lt;attribute&gt; element supports the following attributes</p>
+<p>=== Name ===</p>
+<p>The mandatory attribute 'name' selects the attribute from the relaxng schema with its qname.</p>
+<p>=== Element ===</p>
+<p>The optional attribute 'element' selects only the attributes with the qname given by the attribute 'name'
+with the elements qname.</p>
+<p>=== Rename ===</p>
+<p>The optional attribute 'rename' changes the variable 'attributename' for the selected attributes.
+This can be used f.e. to avoid generating getter/setter methods which names collide with base class methods.</p>
+<p>=== Type-name ===</p>
+<p>The optional attribute 'type-name' changes the variable 'conversiontype' for the selected attributes.
+This can be used f.e. to have different attributes from multiple elements with the same defined values
+to use a shared class for conversions.</p>
+<p>== Data ==</p>
+<p>The &lt;data&gt; element supports the following attributes</p>
+<p>=== Name ===</p>
+<p>The mandatory attribute 'name' selects the data type by its qname. Data types are the types defined in the relaxng
+schema by the &lt;data&gt; elements inside the &lt;attribute&gt; element. The name can also be the name of a &lt;ref&gt;
+element. In that case the processing of the relaxng schema stops at this &lt;ref&gt; element and the configuration
+from this element is used.</p>
+<p>=== Value-type ===</p>
+<p>The mandatory attribute 'value-type' changes the variable 'valuetype' for attributes using this data-type.</p>
+<p>=== Conversion-type ===</p>
+<p>The optional attribute 'conversion-type' changes the variable 'conversion-type' for attributes using this data-type.
+If this attribute is not available, the variable 'conversion-type' will have the same value as the variable 'valuetype'.</p>
+<p>= The template file =</p>
+<p>The template file must be a valid xml file with the element &lt;template&gt; as the root element. It can contain
+the following elements</p>
+<p>== Code ==</p>
+<p>The &lt;code&gt; element outputs the characters inside this element to the current output file.
+The characters are scanned for expressions before written to the file.</p>
+<p>&lt;code&gt;
+  // this element generates a comment
+&lt;/code&gt;<br />
+</p>
+<p>== Define ==</p>
+<p>The &lt;define&gt; element does not execute its child elements but remembers them with the given name for later
+use with the &lt;ref&gt; element.</p>
+<p>The mandatory attribute 'name' gives the name for this define.</p>
+<p>&lt;define name="header"&gt;
+  &lt;code&gt;
+  // This file uses the gpl
+  // Do not edit this file as it is automaticaly generated!
+  &lt;/code&gt;
+&lt;/define&gt;</p>
+<p>== Ref ==</p>
+<p>The &lt;ref&gt; element executes the child elements of a &lt;define&gt; element with the same name.</p>
+<p>The mandatory attribute 'name' selects the &lt;define&gt; by its attribute 'name'.</p>
+<ref name="header"/>
+
+<p>== If ==</p>
+<p>The &lt;if&gt; element executes its child elements only if the evaluated expression from its attribute 'test' is
+a non empty string and not the string constant 'false'.</p>
+<p>The mandatory attribute 'test' is evaluated as an expression.</p>
+<p>&lt;if test="elementname='text:a'&gt;
+  &lt;code&gt;
+    // interface for links
+    public String getLink();
+    public void setLink( String newLink );
+  &lt;/code&gt;
+  &lt;/if&gt;</p>
+<p>== Else ==</p>
+<p>The &lt;else&gt; element is always ignored, except if it is a child element inside an &lt;if&gt; element and the
+test attribute was evaluated to 'false' or an empty string.</p>
+<p>&lt;if test="elementbasename=''"&gt;
+  &lt;code&gt;
+  class %{elementname} extends DefaultElement
+  &lt;/code&gt;
+  &lt;else&gt;
+  &lt;code&gt;
+  class %{elementname} extends %{elementbasename}
+  &lt;/code&gt;
+  &lt;/else&gt;
+  &lt;/if&gt;</p>
+<p>== Set ==</p>
+<p>The &lt;set&gt; element changes all variables with the names of the given attributes to their values. The values
+are scanned for expressions before assignement.</p>
+<p>&lt;set elementname="Hyperlink"/&gt;
+  &lt;set elementclassname="Odf%{elementname}Element"/&gt;
+  &lt;code&gt;
+  class %{elementclassname} extends OdfElement
+  {
+  }
+  &lt;/code&gt;</p>
+<p>will output</p>
+<p>class OdfHyperlinkElement extends OdfElement
+  {
+  }</p>
+<p>== Foreach ==</p>
+<p>The &lt;foreach&gt; element executes its child elements once for all objects of the given type from the relaxng schema.</p>
+<p>The mandatory attribute 'type' must have one of the following values</p>
+<p>=== 'element' ===</p>
+<p>All elements that are defined in the relaxng are iterated. For each element the following variables will be set</p>
+<ul>
+<li>'elementqname' is the qualified name of the current element.</li>
+<li>'elementname' is the same as 'elementqname' by default. The configuration file can override this.</li>
+<li>'elementstylefamily' is empty by default. The configuration file can override this.</li>
+</ul>
+<p>=== 'attribute' ===</p>
+<p>All attributes of the currently selected element as defined in the relaxng schema are iterated. For each attribute the following variables will be set</p>
+<ul>
+<li>'attributeqname' is the qualified name of the current attribute</li>
+<li>'attributename' is the same as 'attributeqname' by default. The configuration file can override this.</li>
+<li>'valuetype' is the data type of the &lt;data&gt; element for this attribute. If this attribute is defined by &lt;value&gt; elements, it is set to 'enum'. The configuration file can override this.</li>
+<li>'conversiontype' is the same as 'valuetype' by default. The configuration file can override this.</li>
+<li>'defaultvalue' is the default value for this attribute as defined by the relaxng schema.</li>
+</ul>
+<p>=== 'value' ===</p>
+<p>All values for the currently selected atteribute as defined in the relaxng schmea are iterated. For each value the following variable 'value' will be set.
+This only works for attributes that are defined using &lt;value&gt; elements in the relaxng schema.</p>
+<p>=== 'namespace' ===</p>
+<p>All namespaces used in the relaxng schema are iterated. For each namespace the following variables will be set</p>
+<ul>
+<li>'namespaceprefix' is the prefix of the current namespace</li>
+<li>'namespaceuri' is the uri of the current namespace</li>
+</ul>
+<p>== Select ==</p>
+<p>The &lt;select&gt; element works the same as the &lt;foreach&gt; element but instead of iterating all objects of the given type it selects only one object by its qname with the mandatory attribute 'name'.
+Can only be used for types 'element', 'attribute' and 'namespace'.</p>
+<p>== File ==</p>
+<p>The &lt;file&gt; element opens a new text file for writing. The following attributes are supported</p>
+<p>=== Path ===</p>
+<p>The mandatory attribute 'path' specifies the path of the new file.</p>
+<p>=== Name ===</p>
+<p>The mandatory attribute 'name' specifies the name of the new file.</p>
+<p>=== Extension ===</p>
+<p>The mandatory attribute 'extension' specifies the extension of the new file.</p>
+<p>= Expressions =</p>
+<p>Expressions can be part of characters inside &lt;code&gt; elements and inside some attributes.
+If embedded inside other text they are distinguished by putting them inside %{...} constructs.
+Expressions can contain variable names, contant strings, operators and functions</p>
+<p>== Variables ==</p>
+<p>Variables must start with a us-ascii character ('a-z' or 'A-Z) or one of the following characters '_' '.' and
+contain more of the same characters and also digits.</p>
+<p>The following example</p>
+<p>&lt;set testvar="World"/&gt;<br />
+  &lt;code&gt;Hello %{testvar}!&lt;/code&gt;</p>
+<p>outputs</p>
+<p>Hello World!<br />
+</p>
+<p>== Constant strings ==</p>
+<p>Constand strings must be delimeted by either ' or " like c++ or java strings.</p>
+<p>The following example</p>
+<p>&lt;set testvar="yes"/&gt;
+  &lt;if test="testvar='yes'"&gt;
+  &lt;code&gt;
+  Yes!
+  &lt;/code&gt;
+  &lt;else&gt;
+  &lt;code&gt;
+  No!
+  &lt;/code&gt;
+  &lt;/else&gt;
+  &lt;/if&gt;</p>
+<p>outputs</p>
+<p>Yes!</p>
+<p>== Operators ==</p>
+<p>The following operators are supported (given from lowest to highes priority)</p>
+<p>=== not ===</p>
+<p>The not operator returns 'true' of the following string expression is not empty and not 'false' or 'false' otherwise.</p>
+<p>The following example</p>
+<p>&lt;set testvar="yes"/&gt;
+  &lt;code&gt;
+  %{ testvar } or %{ not testvar }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>yes or false</p>
+<p>=== + ===</p>
+<p>The + operator concatenates two string expressions.</p>
+<p>The following example</p>
+<p>&lt;code&gt;
+  %{ 'Hello' + ' ' + "World" + "!" }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>Hello World!</p>
+<p>=== or ===</p>
+<p>The or operator returns 'true' if the previous string expression is not empty and not 'false' or the next string expression is not empty and not 'false'.</p>
+<p>&lt;code&gt;
+  %{ 'true' or 'false' }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>true</p>
+<p>=== and ===</p>
+<p>The or operator returns 'true' if the previous string expression is not empty and not 'false' and the next string expression is not empty and not 'false'.</p>
+<p>&lt;code&gt;
+  %{ 'true' and 'false' }
+  %{ 'true' and 'true' }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>false
+  true</p>
+<p>=== Equals  ===</p>
+<p>The '=' operator returns 'true' if the previous string expression is equal to the next string expression or 'false' otherwise.</p>
+<p>&lt;code&gt;
+  %{ 'true' = 'false' }
+  %{ 'hello' = 'hello' }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>false
+  true</p>
+<p>=== Unequals  ===</p>
+<p>The '!=' operator returns 'false' if the previous string expression is equal to the next string expression or 'true' otherwise.</p>
+<p>&lt;code&gt;
+  %{ 'true' != 'false' }
+  %{ 'hello' != 'hello' }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>true
+  false</p>
+<p>== Functions ==</p>
+<p>Functions start with a name followed by a pair of brackets with a list of coma seperated parameters inside. The following functions are supported</p>
+<p>=== toupper ===</p>
+<p>The function toupper returns the given string as an upercase version</p>
+<p>&lt;code&gt;
+  %{ toupper('true') }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>TRUE</p>
+<p>=== tolower ===</p>
+<p>The function tolower returns the given string as a lowercase version.</p>
+<p>&lt;code&gt;
+  %{ toupper('TRUE') }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>true</p>
+<p>=== prefix ===</p>
+<p>The function 'prefix' returns the namespace prefix from a qualified name.</p>
+<p>=== local_name ===</p>
+<p>The function 'local_name' returns the local name from a qualified name.</p>
+<p>&lt;set qname='text:section'/&gt;
+  &lt;code&gt;
+  %{ prefix(qname) }
+  %{ local_name(qname) }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>text
+  section</p>
+<p>=== identifier ===</p>
+<p>The function 'identifier' converts the given string into a valid java/c++ identifier.
+If the given string is a qualified name, it first removes the prefix.
+Then all '-' Characters will be removed and all characters following '-' will be converted to upercase.
+If the result begins with a non valid character, a '_' will be inserted as the first character.</p>
+<p>&lt;set qname='text:section'/&gt;
+  &lt;code&gt;
+  %{ identifier('text:anchor-position') }
+  %{ identifier('300') }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>AnchorPosition
+  _300</p>
+<p>=== endswith ===</p>
+<p>The function 'endswith' returns true if the first parameter ends with the second.</p>
+<p>&lt;code&gt;
+  %{ endswith('foobar','bar') }
+  %{ endswith('foobar','foo') }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>true
+  false</p>
+<p>=== startswith ===</p>
+<p>The function 'startswith' returns true if the first parameter starts with the second.</p>
+<p>&lt;code&gt;
+  %{ startswith('foobar','bar') }
+  %{ startswith('foobar','foo') }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>false
+  true</p>
+<p>=== startswith ===</p>
+<p>The function 'startswith' returns true if the first parameter starts with the second.</p>
+<p>&lt;code&gt;
+  %{ startswith('foobar','bar') }
+  %{ startswith('foobar','foo') }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>false
+  true</p>
+<p>=== replace ===</p>
+<p>The function 'replace' replaces all occurrences of the first parameter with the second parameter inside the third parameter.</p>
+<p>&lt;code&gt;
+  %{ replace('USA','World','Hello USA!') }
+  &lt;/code&gt;</p>
+<p>outputs</p>
+<p>Hello World!</p>
+<p style="margin: 15px 0px; text-align:center">Back to: [[Home|ODFDOM Wiki Home]] || [http://odftoolkit.org/ ODF Toolkit Wiki Home]</p>
+  </div>
+
+  <div id="footera">
+    <div id="poweredby">
+      <p><img src="/odftoolkit/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p>
+    </div>
+    <div id="copyrighta">
+      <p>
+	Apache "ODF Toolkit" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+	Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and
+	decision making process	have stabilized in a manner consistent with other successful ASF projects. While incubation status is
+	not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has
+	yet to be fully endorsed by the ASF.</p>
+      <p>
+	Copyright &copy; 2011 The Apache Software Foundation Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+	<a href="/openofficeorg/contact.html">Contact Us</a>
+	<br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+	<br />Other names appearing on the site may be trademarks of their respective owners.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-New-Layered-Model.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODFDOM-New-Layered-Model.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODF_Package.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ODF_Package.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ProjectOverview.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ProjectOverview.html (added)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/odfdom/ProjectOverview.html Thu Aug 25 21:23:39 2011
@@ -0,0 +1,118 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+<link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
+
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+</head>
+
+<body>
+  <div id="banner">
+   <!-- <div id="bannerleft"><a alt="Apache ODF Toolkit (incubating)" href="http://incubator.apache.org/odftoolkit/">
+      <img id="logo" alt="Apache ODF Toolkit (Incubating)" src="/odftoolkit/images/ooo-logo.png"/></a></div> -->
+    <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org">
+      <img id="asf-logo" alt="Apache Incubator" src="/odftoolkit/images/apache-incubator-logo.png"/></a></div>
+   <div id="bannercenter"><br/>&nbsp;&nbsp;&nbsp;&nbsp;Apache ODF Toolkit (incubating)</div>
+  </div>
+  <div id="clear"></div>
+  
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
+  
+    
+    <p>=Project Overview=</p>
+<p>The ODFDOM project's objective is to provide an easy API for reading, writing and manipulating documents of the OpenDocument format (ODF). 
+To archive this, the ODFDOM API follows a layered approach to access documents, as layered design is the robust foundation for a well-designed modular structure.</p>
+<p>The two ODFDOM layers are:
+<em> '''The ODF Package Layer''':<br/>Provides access to all resources stored within the ODF package, such as XML streams, images or embedded objects. This layer covers all features from the [http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part3.html third part of the ODF 1.2 specification] defining the ODF Package features. The ODF 1.2 package features are build on top technologies as [http://www.pkware.com/documents/APPNOTE/APPNOTE_6.2.0.txt ZIP package handling], [http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/ W3C encryption], [http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/ W3C signature] and [http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ W3C metadata].
+</em> '''The ODF XML Layer''':<br/>Provides all the features of an office format, such as tables, images, numbering etc. All features are defined in [http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part1.html the first part of the ODF 1.2 specification] describing the ODF XML schema. This layer consists of two APIs representing two different views on the features:
+<strong> ''The low-level DOM API'':<br/>Gives access to the XML, the elemental parts of the ODF schema features. With this API it is easy to manipulate all specified XML nodes extending the platform and language independent DOM API [http://www.w3.org/DOM/ DOM API standardized by the W3C] - best-known by its implementation through the browsers. It extends the DOM API using a typed DOM. For every ODF XML element and ODF XML attribute defined by the ODF grammar (the RelaxNG schema) a unique class exists, providing methods for their allowed children. The purpose is to provide the user a corset to easily write valid ODF without consulting the spec constantly. This API is very consistent as instead of laboriously writing all these classes, the sources were generated directly from the ODF schema. This generation guarantees complete coverage of the ODF specification on one side and an easy and accurate upgrade to future ODF specifications on the other. 
+</strong> ''The high-level Document API'':<br/>Provides a different much more high level view on the ODF schema features. This API is concerned about usability, hiding all ODF XML implementation details from the user, covering frequent user scenarios. For example, changing the content of a certain spreadsheet cell (e.g. Add 'Hello World' to a spreadsheet cell positioned at 'B2'). While in the ODF DOM API in general each class represents an ODF XML node, here a class covers multiple underlying ODF XML elements (&amp; their attributes). Think of puzzle piece consisting of multiple smaller pieces. Therefore the typed DOM tree is being mapped to feature tree.<br/></p>
+<p><center> [[image: ODFDOM-New-Layered-Model.png]]</center></p>
+<br/>
+
+<p>ODFDOM is part of the [http://odftoolkit.org ODF Toolkit project]. Development is discussed on the [http://odftoolkit.org/projects/odfdom/lists dev mailing list], users should ask their questions on the [http://odftoolkit.org/projects/odfdom/lists users mailing list].
+<br/></p>
+<p style="margin: 25px 0px; text-align:center">[[layers|'''More detailed information about ODFDOM layers''']].</p>
+  </div>
+
+  <div id="footera">
+    <div id="poweredby">
+      <p><img src="/odftoolkit/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p>
+    </div>
+    <div id="copyrighta">
+      <p>
+	Apache "ODF Toolkit" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+	Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and
+	decision making process	have stabilized in a manner consistent with other successful ASF projects. While incubation status is
+	not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has
+	yet to be fully endorsed by the ASF.</p>
+      <p>
+	Copyright &copy; 2011 The Apache Software Foundation Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+	<a href="/openofficeorg/contact.html">Contact Us</a>
+	<br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+	<br />Other names appearing on the site may be trademarks of their respective owners.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>



Mime
View raw message