|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] question about a non-trivial apply-templates
Hi all..
How can I this?
I have an XML, for example,
<rowset>
<row>
<field1>....</field1>
<field2>....</field2>
<field3>1</field3>
</row>
<row>
<field1>....</field1>
<field2>....</field2>
<field3>1</field3>
</row>
<row>
<field1>....</field1>
<field2>....</field2>
<field3>2</field3>
</row>
<row>
<field1>....</field1>
<field2>....</field2>
<field3>2</field3>
</row>
<row>
<field1>....</field1>
<field2>....</field2>
<field3>3</field3>
</row>
<row>
<field1>....</field1>
<field2>....</field2>
<field3>3</field3>
</row>
</rowset>
Notice the value of field3 in each <row>.
I want to program an XSL that generates an HTML page that has 3 separate sectors, one for each value of field3. Each sector has exactly the same structure, more or less this way:
sector 1 (when field3 evaluates to 1)
row1
label1 = value1
label2 = value2
row2
label1 = value1
label2 = value1
<blank space>
sector 2 (when field3 evaluates to 2)
row1
label1 = value1
label2 = value2
row2
label1 = value1
label2 = value1
<blank space>
sector 3 (when field3 evaluates to 3)
row1
label1 = value1
label2 = value2
row2
label1 = value1
label2 = value1
I could do it if I generate an XML with the 3 sectors separately and calling apply templates for each, but in this case, that XML is built by mean of an Oracle query, so I cannot modify it.
Any help?
Thanks a lot in advance
Jaime
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








