| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 02/03/2010 10:46:17
|
Roland Vonk
Joined: 02/03/2010 10:38:07
Messages: 6
Offline
|
Hi there,
I'm trying to iterate over nodes in a table. For this purpose, I'm using break-level in a table. However, I now want to print some attributes of a series of child nodes that each have a different name.
Example:
<webshop>
<Costs>
<Deliverycosts label="Verzendkosten" price="1,00" tax="True" taxincluded="True" withouttax="0,00" />
<Paymentcosts label="Kosten betaalwijze" price="2,00" tax="True" taxincluded="True" withouttax="0,00" />
<Administrativecosts label="Administratiekosten" price="3,00" tax="True" taxincluded="True" withouttax="0,00" />
<coupon label="50% korting" price="-5,00" tax="True" taxincluded="True" withouttax="0,00" />
</Costs>
</webshop>
I want to print the "label" and "price" attributes, in 4 separate rows.
So the break level on the row should be <webshop><Costs>/*
However, the dialog in which i specify the break level only allows me to select the <Costs> node, I cannot type /* anywhere (as far as I can see).
How should I do this within XSL Fast? I know how to do it in XSL or in FO, but I want to use the layout facilities in xsl fast.
Thanks for your response,
Roland
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 05/03/2010 11:59:08
|
Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 53
Offline
|
To specify custom filtering, you need to:
1. At proper row, right click -> context menu -> add/edit break level.
2. At opened dialog, follow to 2nd tab, and in expression window, specify data you need (e.g. Costs/*).
3. Press [Add] button.
Now, you have custom virtual grouping assigned to selected row and the rest rows till end of table. Of course, you can use newly created filtering for whole table grouping or even for page grouping as well, like the following image:
Also, to let you manage sub-elements of virtual grouping (filtering) easy, you can do the following:
Drop Costs/Deliverycosts (or any other leaf you want) into edit box "Copy from", and check option [x] Copy subtree. With this trick, you'll specify XSLfast which leafs will be shown at main tree as children leafs for drag and drop. Usually, you don't need to do this manually, and XSLfast able to compute this information on the fly. But for your case XSLfast needs an hint.
|
Best regards,
Victor Krapivin |
|
|
 |
|
|
|
|