[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: assigned variable value is changing

Subject: Re: assigned variable value is changing
From: Ganesh Babu N <nbabuganesh@xxxxxxxxx>
Date: Wed, 5 Aug 2009 14:12:00 +0530
Re:  assigned variable value is changing
Hai i will try to explain one by one.

1. first row in the input:

<row>
  <entry namest="c1" nameend="c3" align="left" valign="top">Table 1
Title</entry>
</row>

first cell in the output:
<cell Name="0:0" RowSpan="1" ColumnSpan="3">Table 1 Title</cell>

In the above in @Name, 0:0. represents first column and first row.
Because of the colspan there won't be any cells/entry in this row.

2. 2nd row in the input:

<row>
  <entry namest="c1" nameend="c2" align="left" valign="top">Table 1 TH
C1 R1 and TH C2 R1 merged</entry>
  <entry align="left" valign="top">Table 1 TH C3 R1</entry>
 </row>

cells corresponding to 2nd row in the output:

<cell Name="0:1" RowSpan="1" ColumnSpan="2">Table 1 TH C1 R1 and TH C2
R1 merged</cell>
<cell Name="2:1" RowSpan="1" ColumnSpan="1">Table 1 TH C3 R1</cell>

first cell is having @Name value as 0:1 means first column and 2nd row
2nd cell is having @Name value as 2:1 means 3rd column and 2nd row.
Because of the colspan the 2nd column is clubbed with the first one.

3. 3rd row in the input:

<row>
    <entry align="left" valign="top">Table 1 TH C1 R2</entry>
    <entry align="left" valign="top">Table 1 TH C2 R2</entry>
    <entry align="left" valign="top">Table 1 TH C3 R2</entry>
</row>

cells corresponding to 3rd row in the output:

<cell Name="0:2" RowSpan="1" ColumnSpan="1">Table 1 TH C1 R2</cell>
<cell Name="1:2" RowSpan="1" ColumnSpan="1">Table 1 TH C2 R2</cell>
<cell Name="2:2" RowSpan="1" ColumnSpan="1">Table 1 TH C3 R2</cell>

first cell is having @Name value as 0:2 means first column third row
2nd cell is having @Name value as 1:2 means 2nd column third row
3rd cell is having @Name value as 2:2 means 3rd column third row

The problem is there in the column number. i am taking the count of
<entry> tags and reducing by 1 in each row.

in the 2nd row 2nd <entry> i have tested for the presence of colspan
and increased the column number from 1 to 2. This condition is false
from 3rd row. So I am getting NaN. But i have included another
condition where colspan not present. But seems this condition is not
working and output is still NaN.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.