User's Manual

Chapter 12. Presentation (Bebop) Tutorial 157
You would use this Page like any other, for example, Page p = new SockPuppetPage();
p.add(...); .... However, when you call buildDocument, the generated DOM will include all
of the content from the header, footer, etc.:
bebop:page
... some page boilerplate ...
socksite:top
bebop:label
SockPuppet.com: dynamic page header. You requested: ...
/bebop:label
/socksite:top
socksite:side
bebop:label
SockPuppet.com: static side panel
/bebop:label
/socksite:side
socksite:bottom
bebop:label
SockPuppet.com: static footer
/bebop:label
/socksite:bottom
socksite:main
... main contents here ...
/socksite:main
/bebop:page
Note
The order of the components in the DOM may have nothing at all to do with the ordering of the output.
The page components just ensure that the right content is generated with the right logical structure.
It is up to the XSLT stylesheet to ensure that a socksite:top element really appears at the top of
the page.
You would need an XSLT template rule such as the following to convert the above DOM into mean-
ingful XHTML output:
!-- match the layout element and put the
header, footer, etc., in their appropriate places. --
xsl:template match="socksite:layout"
xmlns:socksite="http://www.sockpuppet.com/xmlns"
xsl:apply-templates select="socksite:top"/
table
tr
td width="25%" xsl:apply-templates
select="socksite:side"/ /td
td xsl:apply-templates
select="socksite:main"/ /td
/tr