Modified: webservices/jaxme/branches/MAVEN/projects/xs/xdocs/index.xml URL: http://svn.apache.org/viewcvs/webservices/jaxme/branches/MAVEN/projects/xs/xdocs/index.xml?rev=233455&r1=233454&r2=233455&view=diff ============================================================================== --- webservices/jaxme/branches/MAVEN/projects/xs/xdocs/index.xml (original) +++ webservices/jaxme/branches/MAVEN/projects/xs/xdocs/index.xml Fri Aug 19 01:38:28 2005 @@ -16,11 +16,14 @@ limitations under the License. --> -<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd"> <document> - <header><title>The JaxMe parser for XML Schema</title></header> + <properties> + <title> + The JaxMe parser for XML Schema + </title> + </properties> <body> - <section><title>The JaxMe parser for XML Schema</title> + <section name="The JaxMe parser for XML Schema"> <p>This is JaxMeXS, a parser for XML schema. Yet another one, to be precise. As there are a lot of other parsers around, the question arises: What makes it different? What advantages does it have?</p>
Modified: webservices/jaxme/branches/MAVEN/projects/xs/xdocs/logical.xml URL: http://svn.apache.org/viewcvs/webservices/jaxme/branches/MAVEN/projects/xs/xdocs/logical.xml?rev=233455&r1=233454&r2=233455&view=diff ============================================================================== --- webservices/jaxme/branches/MAVEN/projects/xs/xdocs/logical.xml (original) +++ webservices/jaxme/branches/MAVEN/projects/xs/xdocs/logical.xml Fri Aug 19 01:38:28 2005 @@ -16,16 +16,16 @@ limitations under the License. --> -<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd"> + <document> - <header><title>The logical parser</title></header> + <properties><title>The logical parser</title></properties> <body> - <section><title>The logical parser</title> - <p>As we have <link href="syntax.html">already said</link>, the JaxMe + <section name="The logical parser"> + <p>As we have <a href="syntax.html">already said</a>, the JaxMe parser for XML Schema, is an application of multiple layers. There is a - <link href="generic.html">generic parser</link>, + <a href="generic.html">generic parser</a>, which is mostly independent of a certain XML language. The second layer - is the <link href="syntax.html">syntax parser</link>, which you typically + is the <a href="syntax.html">syntax parser</a>, which you typically do not want to use. Most probably you are mainly interested in the topmost layer: The logical parser.</p> <p>The logical parser presents the XML Schema in a way, which you will @@ -34,12 +34,13 @@ redefinitions and all that kind of stuff for you. Ideally you do not even notice, that they are in use.</p> <ul> - <li><link href="#use">Using</link> the logical parser</li> - <li>Accessing locical <link href="#context">context information</link></li> + <li><a href="#use">Using</a> the logical parser</li> + <li>Accessing locical <a href="#context">context information</a></li> </ul> </section> - <section><title>Using the logical parser</title> + <anchor id="use"/> + <section name="Using the logical parser"> <p>The logical parser is used as follows:</p> <source><![CDATA[ import java.io.File; @@ -65,7 +66,7 @@ </section> <anchor id="context"/> - <section><title>Accessing logical context information</title> + <section name="Accessing logical context information"> <p>Within your own beans or bean methods, it might be interesting from time to time, whether you are currently within an imported or included schema. If so, you might also want to know about the outer schemas. Modified: webservices/jaxme/branches/MAVEN/projects/xs/xdocs/syntax.xml URL: http://svn.apache.org/viewcvs/webservices/jaxme/branches/MAVEN/projects/xs/xdocs/syntax.xml?rev=233455&r1=233454&r2=233455&view=diff ============================================================================== --- webservices/jaxme/branches/MAVEN/projects/xs/xdocs/syntax.xml (original) +++ webservices/jaxme/branches/MAVEN/projects/xs/xdocs/syntax.xml Fri Aug 19 01:38:28 2005 @@ -16,37 +16,37 @@ limitations under the License. --> -<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd"> + <document> - <header><title>The syntax parser</title></header> + <properties><title>The syntax parser</title></properties> <body> - <section><title>The syntax parser</title> + <section name="The syntax parser"> <p>JaxMeXS mainly consists of three parts: A - <link href="generic.html">generic parser</link>, which is by no means + <a href="generic.html">generic parser</a>, which is by no means restricted to XML schema, a syntax parser, which is is dedicated to the syntactical aspects of XML schema, and a structure parser, which understands the logic. Extending JaxMeXS will always imply extending the syntax parser. In the most cases this will even be sufficient: Who's interested in creating a language as complex as XML schema?</p> <p>The syntax parser is an application of the - <link href="generic.html">generic parser</link>. This means, that it converts + <a href="generic.html">generic parser</a>. This means, that it converts any element in the XML schema into a Java bean. The attributes and elements are mapped to bean properties. Attributes have simple values like strings or integers, but a child element is yet another bean. In what follows, we'll discuss the following aspects:</p> <ol> - <li><link href="#using">Using</link> the syntax parser.</li> - <li>Making the schema parser to use <link href="#objectFactory">your own beans</link>.</li> - <li>Adding new <link href="#attributes">attributes</link> to an existing schema element.</li> - <li>Handling <link href="#namespaces">different namespaces</link>.</li> - <li>Adding new <link href="#childElements">child elements</link>.</li> + <li><a href="#using">Using</a> the syntax parser.</li> + <li>Making the schema parser to use <a href="#XsObjectFactory">your own beans</a>.</li> + <li>Adding new <a href="#attributes">attributes</a> to an existing schema element.</li> + <li>Handling <a href="#namespaces">different namespaces</a>.</li> + <li>Adding new <a href="#childElements">child elements</a>.</li> </ol> </section> <anchor id="using"/> - <section><title>Using the syntax parser</title> + <section name="Using the syntax parser"> <p>To use the syntax parser, instantiate the class - <link href="../apidocs/org/apache/ws/jaxme/xs/XSParser.html">XSParser</link> and invoke + <a href="./apidocs/org/apache/ws/jaxme/xs/XSParser.html">XSParser</a> and invoke its <code>parse()</code> method, for example like this:</p> <source> import java.io.FileInputStream; @@ -66,7 +66,7 @@ } </source> <p>That's it! The returned instance of - <link href="../apidocs/org/apache/ws/jaxme/xs/xml/XsESchema.html">XsESchema</link> is a + <a href="./apidocs/org/apache/ws/jaxme/xs/xml/XsESchema.html">XsESchema</a> is a standard schema with methods like <code>getTargetNamespace()</code> or <code>getChilds()</code>. For example, the list of global types can be retrieved as follows:</p> @@ -88,14 +88,14 @@ </section> <anchor id="XsObjectFactory"/> - <section><title>Forcing the schema parser to use your own beans</title> + <section name="Forcing the schema parser to use your own beans"> <p>The beans returned by the schema parser are instances of - <link href="../apidocs/org/apache/ws/jaxme/xs/xml/impl/XsObjectImpl.html">XsObjectImpl</link>, + <a href="./apidocs/org/apache/ws/jaxme/xs/xml/impl/XsObjectImpl.html">XsObjectImpl</a>, implementing the interface - <link href="../apidocs/org/apache/ws/jaxme/xs/xml/XsObject.html">XsObject</link>. + <a href="./apidocs/org/apache/ws/jaxme/xs/xml/XsObject.html">XsObject</a>. The <code>XsObject</code> interface allows access to the SAX location.</p> <p>However, you might replace these completely with own implementations: - The <link href="../apidocs/org/apache/ws/jaxme/xs/xml/XsObjectFactory.html">object factory</link> + The <a href="./apidocs/org/apache/ws/jaxme/xs/xml/XsObjectFactory.html">object factory</a> makes it possible.</p> <p>Any of the standard XML schema beans is created by the object factory. For example, the method <code>newXSESchema()</code> is invoked to create @@ -106,7 +106,7 @@ we have to create three classes:</p> <ol> <li>A subclass of - <link href="../apidocs/org/apache/ws/jaxme/xs/xml/impl/XsESchemaImpl.html">XsESchemaImpl</link> + <a href="./apidocs/org/apache/ws/jaxme/xs/xml/impl/XsESchemaImpl.html">XsESchemaImpl</a> with a modified <code>setTargetNamespace()</code> method,</li> <li>an updated object factory, that doesn't create an instance of the base class, but an instance of our subclass,</li> @@ -158,7 +158,7 @@ </section> <anchor id="attributes"/> - <section><title>Adding new attributes to an existing schema element.</title> + <section name="Adding new attributes to an existing schema element"> <p>We already know how to extend the parser.This knowledge will be applied in the following example: We'll have an an additional attribute "ignore" in the element definition. It ought to have a @@ -189,14 +189,14 @@ the object factory to return this bean, if the method <code>newXsTElementImpl()</code> is invoked. We also have to extend the parser to use the extended object factory. These steps have already - been described in the <link href="#XsObjectFactory">previous section</link>, + been described in the <a href="#XsObjectFactory">previous section</a>, so we omit it here.</p> </section> <anchor id="namespaces"/> - <section><title>Handling different namespaces</title> - <p>What we did in the <link href="#attributes">previous</link> section on - <link href="#attributes">adding attributes</link>, wasn't really conforming + <section name="Handling different namespaces"> + <p>What we did in the <a href="#attributes">previous</a> section on + <a href="#attributes">adding attributes</a>, wasn't really conforming to XML Schema. Our attribute had the default namespace, as the standard XML Schema attributes do. Any other namespace had been a better choice. XML Schema allows to include arbitrary attributes into a schema, as long @@ -233,7 +233,7 @@ </section> <anchor id="childElements"/> - <section><title>Adding new child elements</title> + <section name="Adding new child elements"> <p>The handling of a new child is no more complex than the handling of attributes. In fact, it works quite the same. Basically one creates a new bean and adds a bean property to the parent element, as in the following @@ -254,16 +254,16 @@ </source> <p>This code is added to the parent bean. For example, if we want to have a new element <code>xs:schema/xs:myChild</code>, we could create a new subclass of - <link href="../apidocs/org/apache/ws/jaxme/xs/xml/impl/XsESchemaImpl.html">XsESchemaImpl</link> + <a href="./apidocs/org/apache/ws/jaxme/xs/xml/impl/XsESchemaImpl.html">XsESchemaImpl</a> with the above code. By extending the object factory to use our updated schema bean and extending the parser to use our private object factory, we would be done. (The latter steps are as in the first example section on - <link href="#XsObjectFactory">using our own beans</link>.)</p> + <a href="#XsObjectFactory">using our own beans</a>.)</p> <p>There are two possible reasons, why the above code might be insufficient: First of all, the example obviously doesn't care for namespaces. Second, there's a chance that we do not want to create a simple bean. For example, the standard behaviour of - <link href="../apidocs/org/apache/ws/jaxme/xs/xml/impl/XsEAppinfoImpl.html">XsEAppinfo</link> + <a href="./apidocs/org/apache/ws/jaxme/xs/xml/impl/XsEAppinfoImpl.html">XsEAppinfo</a> is to convert child elements into DOM documents.</p> <p>Both becomes possible by the following example:</p> <source> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
