ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1171165 - in /webservices/xmlschema/trunk: src/site/apt/index.apt xmlschema-core/src/site/apt/index.apt xmlschema-core/src/site/site.xml xmlschema-core/src/site/xdoc/schematutorial.xml
Date Thu, 15 Sep 2011 16:32:05 GMT
Author: dkulp
Date: Thu Sep 15 16:32:05 2011
New Revision: 1171165

URL: http://svn.apache.org/viewvc?rev=1171165&view=rev
Log:
Some site updates

Added:
    webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml   (with props)
Modified:
    webservices/xmlschema/trunk/src/site/apt/index.apt
    webservices/xmlschema/trunk/xmlschema-core/src/site/apt/index.apt
    webservices/xmlschema/trunk/xmlschema-core/src/site/site.xml

Modified: webservices/xmlschema/trunk/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/src/site/apt/index.apt?rev=1171165&r1=1171164&r2=1171165&view=diff
==============================================================================
--- webservices/xmlschema/trunk/src/site/apt/index.apt (original)
+++ webservices/xmlschema/trunk/src/site/apt/index.apt Thu Sep 15 16:32:05 2011
@@ -8,7 +8,7 @@ Overview
    XMLSchema 2.0 is a major revision that takes advantage of the facilities of Java 1.5.
 
    For information on how to use the XmlSchema API, please
-   see the {{{xmlschema-core/apidocs/index.html}javadocs}} or the {{{xmlschema-core/schematutorial.html}tutorial}}.
+   see the {{{./xmlschema-core/apidocs/index.html}javadocs}} or the {{{./xmlschema-core/schematutorial.html}tutorial}}.
 
    XmlSchema eagerly welcomes suggestions, documentation,
    and most of all code. Please join our dev list, submit JIRA entries, and

Modified: webservices/xmlschema/trunk/xmlschema-core/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-core/src/site/apt/index.apt?rev=1171165&r1=1171164&r2=1171165&view=diff
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-core/src/site/apt/index.apt (original)
+++ webservices/xmlschema/trunk/xmlschema-core/src/site/apt/index.apt Thu Sep 15 16:32:05
2011
@@ -8,7 +8,7 @@ Overview
    XMLSchema 2.0 is a major revision that takes advantage of the facilities of Java 1.5.
 
    For information on how to use the XmlSchema API, please
-   see the {{{apidocs/index.html}javadocs}} or the {{{schematutorial.html}tutorial}}.
+   see the {{{./apidocs/index.html}javadocs}} or the {{{./schematutorial.html}tutorial}}.
 
    XmlSchema eagerly welcomes suggestions, documentation,
    and most of all code. Please join our dev list, submit JIRA entries, and
@@ -21,8 +21,7 @@ Issues
 
 Downloads
 
-    XmlSchema 2.0 has not yet been released. Maven snapshots are available from the ASF
-    snapshot repository: https://repository.apache.org/content/repositories/snapshots.
+   Most users incorporate XML Schema via maven. You can also download release packages
+   from {{{http://www.apache.org/dyn/closer.cgi/ws/xmlschema/}downloads}}.
 
-  
-  -The XMLSchema Development Team (commons-dev at ws.apache.org)
\ No newline at end of file
+  -The XMLSchema Development Team (dev at ws.apache.org)

Modified: webservices/xmlschema/trunk/xmlschema-core/src/site/site.xml
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-core/src/site/site.xml?rev=1171165&r1=1171164&r2=1171165&view=diff
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-core/src/site/site.xml (original)
+++ webservices/xmlschema/trunk/xmlschema-core/src/site/site.xml Thu Sep 15 16:32:05 2011
@@ -31,17 +31,18 @@
             <item name="XmlSchema" href="http://ws.apache.org/commons/XmlSchema/"/>
         </links>
         <menu name="XML Schema">
-            <item name="Home" href="index.html"/>
+            <item name="Home" href="../index.html"/>
             <item name="Downloads">
                 <item name="Source Code" href="source-repository.html"/>
             </item>
             <item name="Documentation">
+                <item name="Tutorial" href="schematutorial.html"/>
                 <item name="Extensions" href="writingExtensions.html"/>
                 <item name="Javadocs" href="/apidocs/index.html"/>
                 <item name="Jxr Reports" href="jxr.html"/>
                 <item name="JDepend Report" href="jdepend-report.html"/>
                 <item name="View Source"
-                      href="http://svn.apache.org/viewvc/webservices/XmlSchema/trunk/?root=Apache-SVN"/>
+                      href="http://svn.apache.org/viewvc/webservices/xmlschema/trunk/?root=Apache-SVN"/>
             </item>
             <item name="Project Information">
                 <item name="Mailing Lists" href="/mail-lists.html"/>

Added: webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml?rev=1171165&view=auto
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml (added)
+++ webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml Thu Sep 15
16:32:05 2011
@@ -0,0 +1,113 @@
+<!--
+  ~ 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.
+  -->
+
+<xdoc>
+  <properties>
+    <title>Apache XMLSchema Tutorial</title>
+  </properties>
+<body>
+<section name="Contents">
+<ul>
+  <li><a href="#intro">Introduction</a></li>
+  <li><a href="#dependencies">Structure and Dependencies</a></li>
+  <li><a href="#reading">Reading a Schema</a></li>
+  <li><a href="#navigating">Navigating the Schema Model</a></li>
+  <li><a href="#printing">Printing the Schema Model</a></li>
+  <li><a href="#conclusion">Conclusion</a></li>
+</ul>
+</section>
+
+<a name="intro"></a>
+<section name="Introduction">
+
+<p>Apache XMLSchema is a general purpose schema model that can be
+used when a Java object tree representation of an XML schema is required.
+This short tutorial explains how XMLSchema can be utilized.</p>
+<a name="dependencies"></a>
+</section>
+<section name="Structure and Dependencies">
+
+<p>The core XMLSchema classes have <strong>no</strong> third party
+dependencies. However it depends on the XMLUnit and JUnit libraries for unit
+testing. XMLSchema 2.0 requires Java 5 or higher.</p>
+
+<p>The structure of the XMLSchema model is quite straightforward. It
+has a strict specification bound hierarchy of classes that represents each
+and every schema component. It is not based on an interface-implementation
+model which allows extensions and different implementations. However, the
+schema specification is quite stable and complete, hence a change is
+unlikely, which makes XMLSchema sufficient for almost all needs
+of schema handling.</p>
+</section>
+
+<section name="Reading a Schema">
+<a name="reading"></a>
+<p>The reader for the XMLSchema model is called the SchemaCollection
+(org.apache.ws.commons.schema.XmlSchemaCollection). It has a
+<em>read</em> method that returns a XmlSchema object which represents the
+whole schema. The XmlSchema instance returned can be used to access types and
+elements of the relevant schema by their qualified name.</p>
+
+<p>The following code fragment shows how a file can be read through
+the SchemaCollection.
+<source><pre> 
+InputStream is = new FileInputStream(fileName);
+XmlSchemaCollection schemaCol = new XmlSchemaCollection();
+XmlSchema schema = schemaCol.read(new StreamSource(is));</pre></source>
+</p>
+</section>
+
+<a name="navigating"></a>
+
+<section name="Navigating the Schema Model">
+
+<p>Navigation of the model once the XmlSchema model is obtained is also quite
+straight forward. All top level elements and types are available through the
+schema object as either
+<code>org.apache.ws.commons.schema.XmlSchemaObjectTable</code> instances or
+can be accessed directly if it can have a QName reference. For example, if
+the qualified name of an element is known, then getElementByName method can
+be used to extract the XmlSchemaElement object directly from the schema
+object. The following code sample shows how such direct methods can be used
+to extract schema objects</p>
+<source><pre>XmlSchemaType schemaType = schema.getTypeByName(TYPE_QNAME);
+XmlSchemaElement elem = schema.getElementByName(ELEMENT_QNAME);</pre></source>
+
+<p>Note that the TYPE_QNAME and ELEMENT_QNAME represents QName objects.</p>
+<a name="printing"></a>
+<h2>Printing the Schema Model</h2>
+
+<p>Printing of the model once the XmlSchema model has been modified or
+constructed in-memory, is also quite straightforward. Schema object has a
+<em>write</em> method that can use an output stream.</p>
+
+<p>The following code fragment shows how to write the schema into the System
+output stream.</p>
+<source><pre>schema.write(System.out);</pre></source>
+</section>
+
+<!--<h2>Advanced Topics</h2>-->
+<a name="conclusion"></a>
+<section name="Conclusion">
+<p>Apache XMLSchema is quite a versatile piece of code that can be used to
+manipulate and generate XML Schemas. It has minimum dependencies and can be
+used inside another project with ease.</p>
+</section>
+</body>
+</xdoc>

Propchange: webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: webservices/xmlschema/trunk/xmlschema-core/src/site/xdoc/schematutorial.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message