layoutPage
:
This element is responsible for splitting web pages and -forms and/or adding header- or footer-data to
particular pages.
When splitting a large page into smaller pieces, we achieve this by summarizing the ''interesting'' parts in groups and subgroups.
This grouping is done by adding special group- and subgroup-tags (named
foxy:group
and
foxy:subgroup
) into the (existing) web page. This may be done dynamically (by adding the tags via a foregoing
xsl- or xquery-rule) or statically (e.g., when you are the owner of the page). A unique ID is assigned
to each group in order of appearance in the original (HTML-)content. Each subgroup has a unique ID for its group
(i.e., each first subgroup in a group has ID=1) All documents transformed via layoutPage do accept following
URI/URL-parameters:
- ui - allowed values: -1(all), 0(none), 1, 2..
- sg - allowed values: same as ui
- reset - any value allowed, same as ui=-1 & sg=-1
The
layoutPage
-element has five (integer-)attributes, holding the values for
the first and last group-IDs and subgroup-IDs (default for all: -1) and one
for defining the default group that should be displayed, when no group-selecting parameter
has been provided:
- firstGroup
- lastGroup
- firstSubgroup
- lastSubgroup
- defaultGroup
Possible (optional) child-nodes of this element are
defineTag
(multiple times),
header
and
footer
.
The
header
- and
footer
-elements are ap-/prepended to every displayed page-fragment (either a
group or a subgroup) and may help you with adding dynamic context to our transformation.
The header- and footer-scripts are either defined directly (via a
script
-element) or imported
from a file (similar to the
xsl
- and
xquery
-rules, see figure 2.26).
Furthermore, the user can define her own tags, e.g. to give headers of different groups a different look.
This is done by providing special-tags, which are replaced at runtime with their appropriate value.
These special-tags are:
- @currentPage
- @currentGroup
- @currentSubgroup
- @previousGroup
- @nextGroup
- @previousSubgroup
- @nextSubgroup
- @firstGroup
- @lastGroup
- @firstSubgroup
- @lastSubgroup
Figure 2.27:
W3C XML Schema of the layoutPage-element
 |
The
defineTag
-element, which purpose is the definition of special tags,
has following attributes:
- name - The name of the tag
- value - The value of the tag
- source - The group, in which the original tag-definition (in the
HTML code of the header- or footer-element)
should be replaced with the specified value (of the value-attribute).
A self-defined tag has following structure:
We simply describe the usage and meaning of this tag with the help of a short example:
Assuming, one has splitted a web page into groups, it may be convenient to have
a different header on the first page of the group (e.g. a title- or welcome-text).
We define our ''dynamic'' tag as follows:
The above definition tells the system to replace every @welcome-tag found in the
HTML-content with the text ''Welcome to the first page'', - but only if the displayed
source-page/group is the first one in the sequence of groups (attribute source=''1'').
On any other pages, the default text is used. This text is defined directly in the HTML-code.
The @welcome-tag may be implemented (e.g., in the HTML-code of the
header
- or
footer
-element):
As a result, whenever one views the first page/group, the customized
welcome-text (i.e., ''Welcome to the first page'') is ahown.
In all other cases the default-text (e.g., ''Group 4 of 8'') will be displayed.
Figure 2.27 shows the W3C XML Schema of the
layoutPage
-element.