|
DxpHome ||
Samples ||
Details ||
Docs ||
Trees ||
xml-xsl ||
Links
This page queries for a matrix and formats the result using a LoopSet. The output is stored
rather than being written back directly and then displayed using different tag. This is handy if
you want to display the output more than once on the same page or pass the output as a Parameter
inside another dxp tag.
| No. |
Username |
Beverage |
Cost |
| 1 |
Jakob |
Any Cola |
0.50 |
| 2 |
Jakob |
Dr. Pepper |
0.50 |
| 3 |
Mark |
Beer |
3.50 |
| 4 |
Mark |
Latte |
2.50 |
| 5 |
Mark |
Water |
0.00 |
| 6 |
Nick |
Hippie Soda |
1.50 |
A LoopSetIterator can also store output. To keep it interesting we'll group the data by person
and create labels. If we want to display this output more than once it makes sense to store it
rather than regenerate it. We can also store this as bytes which is more efficient to write out
multiple time since it doesn't have to be converted from text each time it's written.
| Items for Jakob |
| 1 |
Any Cola |
0.50 |
| 2 |
Dr. Pepper |
0.50 |
| Items for Mark |
| 3 |
Beer |
3.50 |
| 4 |
Latte |
2.50 |
| 5 |
Water |
0.00 |
| Items for Nick |
| 6 |
Hippie Soda |
1.50 |
Here is the same byte data displayed in a slightly different format
| Items for Jakob |
| 1 |
Any Cola |
0.50 |
| 2 |
Dr. Pepper |
0.50 |
| Items for Mark |
| 3 |
Beer |
3.50 |
| 4 |
Latte |
2.50 |
| 5 |
Water |
0.00 |
| Items for Nick |
| 6 |
Hippie Soda |
1.50 |
Source
|