Example 17-32: XSQL page to display list of postings for a topic

<?xml version="1.0"?>
<!-- TopicPostings.xsql: Show list of postings for a given topic -->
<?xml-stylesheet type="text/xsl" href="ForumStyle.xsl"?>
<page connection="xmlbook" xmlns:xsql="urn:oracle-xsql">
  <!-- Include request params so Actions can check for forumuser cookie -->
  <xsql:include-request-params/>
  <breadcrumbs>
    <xsql:query>
      select t.forumid as "forumid", f.name as "forumname",
             t.id as "topicid", t.title as "topicname"
        from forum_topic t, forum f
        where t.id = {@id}
          and f.id = t.forumid
    </xsql:query>
  </breadcrumbs>
  <actions>
    <link page="EnterForumTopicReply.xsql" label="Post a New Reply" login="yes">
      <xsql:include-param name="id"/>
    </link>
  </actions>
  <data>
    <xsql:query>
      select id as h_id,
             userid  as  "Posted_By",
             posting as "Posting",
             to_char(posted,'dd Mon yyyy, hh24:mi') as "H_Posted_On"
        from forum_topic_posting
       where topicid = {@id}
        order by posted
    </xsql:query>
  </data>
</page>