Default Text Entry in Example Form Field Help Text Entry in Form Field
End When>
End When>
Regrouping Of data:-
Regrouping Syntax
To regroup the data, use the following syntax:
The elements that were at the same hierarchy level as COUNTRY are now children of
COUNTRY. You can then refer to the elements of the group to display the values
desired.
To establish nested groupings within the already defined group, use the following
syntax:
For example, after declaring the CD grouping by COUNTRY, you can then further
group by YEAR within COUNTRY as follows:
At runtime, XML Publisher will loop through the occurrences of the new groupings,
displaying the fields that you defined in your template.
Note: This syntax is a simplification of the XSL for-each-group syntax.
If you choose not to use the simplified syntax above, you can use the
XSL syntax as shown below. The XSL syntax can only be used within a
form field of the template.
Template Example
The following figure shows a template that displays the CDs by Country, then Year,
and lists the details for each CD:
Default Text Entry Form Field Help Text Entry Description
Group by Country
The
tag declares the
new group. It regroups the
existing CD group by the
COUNTRY element.
USA Placeholder to display the
data value of the COUNTRY
tag.
Group by Year
The
tag
regroups the current group
(that is, COUNTRY), by the
YEAR element.
2000 Placeholder to display the
data value of the YEAR tag.
Group: Details
Once the data is grouped by
COUNTRY and then by
YEAR, the
command is used to
loop through the elements of
the current group (that is,
YEAR) and render the data
values (TITLE, ARTIST, and
PRICE) in the table.
My CD Placeholder to display the
data value of the TITLE tag.
John Doe Placeholder to display the
data value of the ARTIST tag.
1.00 Placeholder to display the
data value of the PRICE tag.
End Group Closes out the
tag.
No comments:
Post a Comment