Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] Re: adding column number to the entry [Thread Next] [xsl] Re: adding column number to the entryTo: xsl-list@-----.------------.--- Date: 9/3/2009 12:21:00 PM If you find that your question on XSL-List does not get answered, or
that the answers provided do not meet your need, make it easier for
people to answer the question by clarifying it and/or providing more
information.
In your case, I suggest two things:
1. provide the smallest possible example that illustrates your
question. (it looks to me like there is a lot of "clutter" in
your example; for example cell names and columnspans are not
needed to deal with the question you asked)
2. in addition to a small example describe in words, where the
information in the desired result would come from in the
input. Is it the case that you want RowSpan to equal 1
unless the value of the cell element is longer than 16
characters? Or is there some other logic that you want
implemented in your XSLT?
Please re-post your question, with a more targeted example and a
description of what you are trying to accomplish.
-- Tommie
At 3:07 PM +0530 9/3/09, Ganesh Babu N wrote:
>Please help me on this issue.
>
>Regards,
>Ganesh
>
>On Tue, Sep 1, 2009 at 3:09 PM, Ganesh Babu N<nbabuganesh@g...> wrote:
> > Dear All,
>>
>> I am having a input like this.
>>
>> <table>
>> <row>
>> <entry align="left" valign="top">Table 1 TB C1 R5</entry>
>> <entry align="left" valign="top" morerows="1">Table
>>1 TB C2 R5 and
>> TB C2 R6 are merged</entry>
>> <entry align="left" valign="top">Table 1 TB C3 R5</entry>
>> <entry align="left" valign="top">Table 1 TB C4 R5</entry>
>> </row>
>> <row>
>> <entry align="left" valign="top">Table 1 TB C1 R6</entry>
>> <entry align="left" valign="top">Table 1 TB C3 R6</entry>
>> <entry align="left" valign="top">Table 1 TB C4 R6</entry>
>> </row>
>> </table>
>>
>> My required output is as follows:
>>
>> <table>
>> <cell Name="1" RowSpan="1" ColumnSpan="1">Table 1 TB C1 R5</cell>
>> <cell Name="2" RowSpan="2" ColumnSpan="1">Table 1 TB C2 R5 and TB
>> C2 R6 are merged</cell>
>> <cell Name="3" RowSpan="1" ColumnSpan="1">Table 1 TB C3 R5</cell>
>> <cell Name="4" RowSpan="1" ColumnSpan="1">Table 1 TB C4 R5</cell>
>> <cell Name="1" RowSpan="1" ColumnSpan="1">Table 1 TB C1 R6</cell>
>> <cell Name="3" RowSpan="1" ColumnSpan="1">Table 1 TB C3 R6</cell>
>> <cell Name="4" RowSpan="1" ColumnSpan="1">Table 1 TB C4 R6</cell>
>> </table>
>>
>> I have tried with the following code but it is changing the number in
>> all the 2nd row entries. It requires to be changed only in C3 of R6
>> and C4 of R6. Because C2 of R6 is already merged with C2 of R5.
>>
>> <xsl:template match="entry>
>> <xsl:if test="parent::row/preceding-sibling::row/entry/@morerows">
>> <xsl:value-of select="position() +
>> parent::row/preceding-sibling::row/entry[@morerows]/position()"/>
>> </xsl:if>
>> </xsl:template>
>>
>> Please help me getting required output.
>>
>> Regards,
>> Ganesh
>>
--
======================================================================
B. Tommie Usdin mailto:btusdin@m...
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Phone: 301/315-9631
Suite 207 Direct Line: 301/315-9634
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
