Example 17-34: XSQL page to display discussion topics active today

<?xml version="1.0"?>
<!-- TodaysActiveTopics.xsql: Listing of topics active today -->
<?xml-stylesheet type="text/xsl" href="ForumStyle.xsl"?>
<page connection="xmlbook" xmlns:xsql="urn:oracle-xsql">
  <xsql:action handler="Paging" rows-per-page="5">
      select count(t.id) as "total"
      from forum_topic t,
           forum f
     where t.forumid = f.id
       and t.lastpost BETWEEN TRUNC(SYSDATE) AND TRUNC(SYSDATE+1)
  </xsql:action>
  <breadcrumbs>
    <forumname>Active Topics Today</forumname>
  </breadcrumbs>
  <data>
    <xsql:query skip-rows="{@paging-skip}" max-rows="{@paging-max}">
      select t.id              as h_id,
             t.title           as "Topic",
             f.name            as "Forum"
        from forum_topic t,
             forum f
       where t.forumid = f.id
         and t.lastpost BETWEEN TRUNC(SYSDATE) AND TRUNC(SYSDATE+1)
       order by t.lastpost desc
    </xsql:query>
  </data>
</page>