[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-dev
Subject:    cvs commit: xml-cocoon/samples/sql esql.xsd
From:       balld () locus ! apache ! org
Date:       2000-11-30 5:59:47
[Download RAW message or body]

balld       00/11/29 22:01:53

  Modified:    samples/sql esql.xsd
  Log:
  added annotation to the esql schema, and finally made it validate against the xml \
schema dtd  
  Revision  Changes    Path
  1.7       +177 -48   xml-cocoon/samples/sql/esql.xsd
  
  Index: esql.xsd
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/samples/sql/esql.xsd,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- esql.xsd	2000/11/27 20:27:52	1.6
  +++ esql.xsd	2000/11/30 06:01:52	1.7
  @@ -1,75 +1,204 @@
   <?xml version="1.0"?>
   
  +<!DOCTYPE schema SYSTEM "../../xdocs/dtd/XMLSchema.dtd">
  +
   <schema
     xmlns="http://www.w3.org/2000/10/XMLSchema"
     xmlns:esql="http://apache.org/cocoon/SQL/v2"
   >
   
   <element name="esql:connection">
  +  <annotation>
  +    <documentation>Opens a new database connection.</documentation>
  +  </annotation>
     <complexType>
  -    <choice>
  -      <sequence>
  -        <!-- not schema strings - xsp strings -->
  -        <element name="esql:driver" type="string"/>
  -        <element name="esql:dburl" type="string"/>
  -        <element name="esql:username" type="string" minOccurs="0" maxOccurs="1"/>
  -        <element name="esql:password" type="string" minOccurs="0" maxOccurs="1"/>
  -      </sequence>
  -      <element name="esql:pool" type="string"/>
  -    </choice>
  -    <element name="esql:execute-query" minOccurs="0" maxOccurs="unbounded">
  -      <complexType>
  +    <sequence>
  +      <choice>
           <sequence>
  -          <element name="esql:query">
  -            <complexType mixed="true">
  -              <element name="esql:parameter" minOccurs="0" maxOccurs="unbounded"/>
  -            </complexType>
  +          <!-- not schema strings - xsp strings -->
  +          <element name="esql:driver" type="string">
  +            <annotation>
  +              <documentation>The name of the driver to use</documentation>
  +            </annotation>
  +          </element>
  +          <element name="esql:dburl" type="string">
  +            <annotation>
  +              <documentation>The URL of the database</documentation>
  +            </annotation>
  +          </element>
  +          <element name="esql:username" type="string" minOccurs="0" maxOccurs="1">
  +            <annotation>
  +              <documentation>The database user's name</documentation>
  +            </annotation>
             </element>
  -          <element name="esql:results" minOccurs="0" maxOccurs="1">
  -            <complexType mixed="true">
  -              <element name="esql:row-results" minOccurs="0" maxOccurs="1">
  +          <element name="esql:password" type="string" minOccurs="0" maxOccurs="1">
  +            <annotation>
  +              <documentation>The database user's password</documentation>
  +            </annotation>
  +          </element>
  +        </sequence>
  +        <element name="esql:pool" type="string">
  +          <annotation>
  +            <documentation>The name of the database pool</documentation>
  +          </annotation>
  +        </element>
  +      </choice>
  +      <sequence>
  +        <element name="esql:execute-query" minOccurs="0" maxOccurs="unbounded">
  +          <annotation>
  +            <documentation>Executes a query on the database</documentation>
  +          </annotation>
  +          <complexType>
  +            <sequence>
  +              <element name="esql:query">
  +                <annotation>
  +                  <documentation>The query to execute</documentation>
  +                </annotation>
                   <complexType mixed="true">
                     <sequence>
  -                    <choice>
  -                      <any namespace="##other" minOccurs="0" maxOccurs="unbounded" \
                processContents="lax"/>
  -                      <element name="esql:get-columns" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-string" minOccurs="0" \
                maxOccurs="unbounded" type="EsqlColumnFunction"/>
  -                      <element name="esql:get-date" minOccurs="0" \
                maxOccurs="unbounded" type="EsqlFormattedColumnFunction"/>
  -                      <element name="esql:get-time" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-timestamp" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-boolean" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-double" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-float" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-int" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-long" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-short" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-xml" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-row-position" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-column-name" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-column-label" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                      <element name="esql:get-column-type-name" minOccurs="0" \
                maxOccurs="unbounded"/>
  -                    </choice>
  +                    <element name="esql:parameter" minOccurs="0" \
maxOccurs="unbounded">  +                      <annotation>
  +                        <documentation>A parameter for a prepared \
statement</documentation>  +                      </annotation>
  +                    </element>
                     </sequence>
                   </complexType>
                 </element>
  -              <!-- strings and stuff from other namespaces -->
  -              <element name="esql:no-results" minOccurs="0" maxOccurs="1"/>
  -              <!-- strings and stuff from other namespaces -->
  -            </complexType>
  -          </element>
  -          <element name="esql:update-results" minOccurs="0" maxOccurs="1"/>
  -          <element name="esql:error-results" minOccurs="0" maxOccurs="1"/>
  -        </sequence>
  -      </complexType>
  -    </element>
  +              <element name="esql:results" minOccurs="0" maxOccurs="1">
  +                <annotation>
  +                  <documentation>This element's children are instantiated in the \
result tree when the query returns a resultset</documentation>  +                \
</annotation>  +                <complexType mixed="true">
  +                  <sequence>
  +                    <element name="esql:row-results" minOccurs="0" maxOccurs="1">
  +                      <annotation>
  +                        <documentation>This element's children are instantiated in \
the result tree for each row in the resultset</documentation>  +                      \
</annotation>  +                      <complexType mixed="true">
  +                        <sequence>
  +                          <choice>
  +                            <any namespace="##other" minOccurs="0" \
maxOccurs="unbounded" processContents="lax"/>  +                            <element \
name="esql:get-columns" minOccurs="0" maxOccurs="unbounded">  +                       \
<annotation>  +                                <documentation>Returns a sequence of \
elements whose names are the current row's column names, and whose values are the \
current row's column values</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-string" minOccurs="0" \
maxOccurs="unbounded" type="EsqlColumnFunction">  +                              \
<annotation>  +                                <documentation>Returns the value of \
the given column in the current row as a string</documentation>  +                    \
</annotation>  +                            </element>
  +                            <element name="esql:get-date" minOccurs="0" \
maxOccurs="unbounded" type="EsqlFormattedColumnFunction">  +                          \
<annotation>  +                                <documentation>Returns the value of \
the given column in the current row as a date</documentation>  +                      \
</annotation>  +                            </element>
  +                            <element name="esql:get-time" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a time</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-timestamp" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a timestamp</documentation>  +                           \
</annotation>  +                            </element>
  +                            <element name="esql:get-boolean" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a boolean</documentation>  +                             \
</annotation>  +                            </element>
  +                            <element name="esql:get-double" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a double</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-float" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a float</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-int" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a int</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-long" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a long</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-short" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the value of the given \
column in the current row as a short</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-xml" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Parses the value of the given \
column in the current row as XML and returns it</documentation>  +                    \
</annotation>  +                            </element>
  +                            <element name="esql:get-row-position" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the position of the current \
row in the resultset</documentation>  +                              </annotation>
  +                            </element>
  +                            <element name="esql:get-column-name" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the name of the given \
column in the current row</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-column-label" minOccurs="0" \
maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the label of the given \
column in the current row</documentation>  +                              \
</annotation>  +                            </element>
  +                            <element name="esql:get-column-type-name" \
minOccurs="0" maxOccurs="unbounded">  +                              <annotation>
  +                                <documentation>Returns the type name of the given \
column in the current row</documentation>  +                              \
</annotation>  +                            </element>
  +                          </choice>
  +                        </sequence>
  +                      </complexType>
  +                    </element>
  +                    <element name="esql:no-results" minOccurs="0" maxOccurs="1">
  +                      <annotation>
  +                        <documentation>This element's children are instantiated in \
the result tree for each row in the resultset</documentation>  +                      \
</annotation>  +                    </element>
  +                  </sequence>
  +                </complexType>
  +              </element>
  +              <element name="esql:update-results" minOccurs="0" maxOccurs="1">
  +                <annotation>
  +                  <documentation>This element's children are instantiated in the \
result tree if the query returns a number of rows</documentation>  +                \
</annotation>  +              </element>
  +              <element name="esql:error-results" minOccurs="0" maxOccurs="1">
  +                <annotation>
  +                  <documentation>This element's children are instantiated in the \
result tree if the query results in a database error. If this element does not exist, \
the error is passed on to the xsp layer. If it does exist, the error is caught here \
unless passed on explicitly.</documentation>  +                </annotation>
  +              </element>
  +            </sequence>
  +          </complexType>
  +        </element>
  +      </sequence>
  +    </sequence>
     </complexType>
   </element>
   
   <complexType name="EsqlColumnFunction">
  +  <annotation>
  +    <documentation>The given column is indicated by the column attribute. If the \
attribute's value is an integer, it is treated as the index of the column in the row, \
otherwise it's value is treated as the name of the column.</documentation>  +  \
</annotation>  <attribute name="column" type="string"/>
   </complexType>
   
   <complexType name="EsqlFormattedColumnFunction">
  +  <annotation>
  +    <documentation>The value of the format attribute can used by some column value \
functions (e.g. date, real) as a template for formatting the column value. This is \
necessarily implementation dependent.</documentation>  +  </annotation>
     <complexContent>
       <extension base="EsqlColumnFunction">
         <attribute name="format" type="string"/>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic