|
Rank: Newbie
Joined: 1/24/2012 Posts: 6
|
Hello,
Just starting with Style Vision and yet I have a big show stopper. Can any one help me.
It creates rows and columns as planned. How can I fill the cells with content.
Kind regards
Jos
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
What is actually your problem? From the screenshot below it is difficult to says what is wrong.
If you attach here all your files with description what you want to see, than the chances increase a lot that somebody can help you.
|
|
Rank: Newbie
Joined: 1/24/2012 Posts: 6
|
vlad wrote:What is actually your problem? From the screenshot below it is difficult to says what is wrong.
If you attach here all your files with description what you want to see, than the chances increase a lot that somebody can help you.
Here more detail:
This is a piece of my xml
<table xsi:type="tabCliNwLft"> <nr>1.1a</nr> <title>Cliëntkenmerken bij nieuw cliënttraject bij bureau jeugdzorg en aanvang onderzoek AMK</title> <tableDescription/> <col0Title>Leeftijd</col0Title> <column index="1" title="Aantal jeugdigen met nieuw cliënttraject bij bureau jeugdzorg"/> <column index="2" title="Aantal jeugdigen bij aanvang onderzoek AMK"/> <row index="1" title="0 tot en met 5 jaar"/> <row index="2" title="6 tot en met 11 jaar"/> <row index="3" title="12 tot en met 14 jaar"/> <row index="4" title="15 tot en met 17 jaar"/> <row index="5" title="18 jaar en ouder"/> <row index="6" title="Onbekend"/> <row index="7" title="Totaal" isTotalRow="true"/> <cell columnIndex="1" rowIndex="1" value="1817"/> <cell columnIndex="1" rowIndex="2" value="1976"/> <cell columnIndex="1" rowIndex="3" value="1102"/> <cell columnIndex="1" rowIndex="4" value="1444"/> <cell columnIndex="1" rowIndex="5" value="114"/> <cell columnIndex="1" rowIndex="6" value="0"/> <cell columnIndex="1" rowIndex="7" value="6453"/> <cell columnIndex="2" rowIndex="1" value="0"/> <cell columnIndex="2" rowIndex="2" value="0"/> <cell columnIndex="2" rowIndex="3" value="0"/> <cell columnIndex="2" rowIndex="4" value="0"/> <cell columnIndex="2" rowIndex="5" value="0"/> <cell columnIndex="2" rowIndex="6" value="0"/> <cell columnIndex="2" rowIndex="7" value="0"/> </table>
You can see the relevant xsd in the attachment.
Each table has dynamic columns and row. For example, some tables have 2 columns, with 5 rows, other tables have 10 columns and 10 rows
Stylevision is able to generate tables with dynamic columns and rows.
But I'm not able to fill each cell. How can I do that? In the result attachment you see 'Content?'. But that needs to be filled bij the value property in the cell elements.
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
Normally, StyleVision can handle tables which grow in both directions automatically, as long as they correspond to either HTML or CALS standard.
Your XML is very unusual, but surely can be handled too. Ideally you should define one variable for row element, let's name it $row, and another one for column element - $column (use Define Variables context menu to do this and assign them value . (dot) in both cases which means current node).
Once you have these variables, all you need is to find the correct cell by using a User-Defined-Template like this
//cell[@columnIndex=$column/@index and @rowIndex=$row/@index]
within this template the rest is done as usual. vlad attached the following image(s):
|
|
Rank: Newbie
Joined: 1/24/2012 Posts: 6
|
Dear vlad, you're the bomb. This is exactly want I want. Unfortunately I'm still unable to reproduce it. What am I doing wrong? Please took a look at the attachments.
Thanks,
Jos
File Attachment(s): probeer2.sps (15kb) downloaded 179 time(s).
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
You can see the reason when you look at your Schema tree - you are using namespace prefix qns: and therefore in your case you must prepend cell with qns: prefix
//qns:cell[@columnIndex=$column/@index and @rowIndex=$row/@index]
|
|
Rank: Newbie
Joined: 1/24/2012 Posts: 6
|
vlad, that's true. I have fixed that. It seems that all values are repeated in each cell. Due to more tables within qns:tables
Please take a look at the new attached probeer.sps
thanks,
Jos
|
|
Rank: Newbie
Joined: 1/24/2012 Posts: 6
|
I've got it:
//qns:cell[@columnIndex=$column/@index and @rowIndex=$row/@index and ../qns:nr=$tableName]
|
|
Rank: Newbie
Joined: 1/24/2012 Posts: 6
|
Thanks vlad, to put me in right direction.
You made my day!!! A lot of pressure of my shoulders now.
Jos
|
|
guest |