Hi Sam,

It seems that your results is the container for the pageinfo.. so
perhaps the following is more what you are after:
<schema
   xmlns="http://www.w3.org/2001/XMLSchema";
        xmlns:page="http://www.example.com/page";
        targetNamespace="http://www.example.com/page";>

        <element name="Page" type="page:PageType"/>

        <complexType name="PageType">
                <sequence>
                <element name="Info" type="page:PaginationType" />
                <element name="Content" type="bytes" />
                </sequence>
        </complexType>

        <complexType name="PaginationType">
                <sequence>
                <element name="recordCount" type="int"/>
                <element name="pageCount" type="int"/>
                <element name="pageSize" type="int"/>
                <element name="pageNum" type="int"/>
                </sequence>
        </complexType>
</schema>

Does this match the intended model for your data ? If not, can you
supply a couple of UML class diagrams (or similar) and I'd be happy to
work with you to create an appropriate schema...

Best regards,
Dan
On 02/02/07, Sam Su <[EMAIL PROTECTED]> wrote:
Hi all,   I would like to ask a question.

I will use JSF+Spring+SDO to develop a web application,  as pagination is a
general function in  web application,
is there anybody who has designed a DataObject which include all
needed  pagination information, such as total count of pages, total count of
records retreived from database, and records(will be presented as a
collection of Data Object)which will be displayed on current page. by using
this DataOjbect,   POJO service bean(implmented by Spring) can return it to
JSF for presentation.

I want to declare a DataObject in xsd file like following, and generate a
static dataobject according to it. but I don't which type should be used to
present 'results' element(will be presented as a collection of Data
Object,which will be displayed on current page).

<xsd:complexType name="Page">
    <xsd:sequence>
      <xsd:element name="recordCount" type="xsd:int"/>
      <xsd:element name="pageCount" type="xsd:int"/>
      <xsd:element name="pageSize" type="xsd:int"/>
      <xsd:element name="pageNum" type="xsd:int"/>
      <xsd:element name="results"
type="??"/>         /**************************which type should be used
here???
    </xsd:sequence>
  </xsd:complexType>

Any suggestion will be appreciated.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to