Click here to Skip to main content
15,919,931 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Convert XML/XSL to Image File Pin
pfsarff9-Jun-05 6:03
pfsarff9-Jun-05 6:03 
GeneralRe: Convert XML/XSL to Image File Pin
DavidNohejl10-Jun-05 9:23
DavidNohejl10-Jun-05 9:23 
GeneralRe: Convert XML/XSL to Image File Pin
Anonymous12-Jun-05 4:27
Anonymous12-Jun-05 4:27 
GeneralXML TO EXCEL Pin
Abhinavbhatia7-Jun-05 1:53
Abhinavbhatia7-Jun-05 1:53 
GeneralRe: Xml programming c# Pin
DavidNohejl7-Jun-05 2:21
DavidNohejl7-Jun-05 2:21 
Generalnested ado datasets in XML Pin
sparty10226-Jun-05 4:50
sparty10226-Jun-05 4:50 
GeneralExport to excel data from ultrawebgrid each row contain one worksheet Pin
sunilmskr3-Jun-05 2:38
sunilmskr3-Jun-05 2:38 
GeneralXSL HTML table and matching tags problem Pin
Leftyfarrell2-Jun-05 4:16
Leftyfarrell2-Jun-05 4:16 
I am looking to edit an XSLT that has 2 nested for-each calls in order to group items based on the value of a subnode of each item.

The innnermost for-next processes each item for html display. I'm using choos-when-otherwise combo to check the position() for the current group. If the position = 1 it is displayed differently than the other items.

What I'd like to do is put the first item contents into an HTML table row and then put ALL of the remaining items for the current group into the next table row.

My problem is I can't put <tr> or <td> tags into the xsl:otherwise node because they are inserted for every item, and I can't seem to put the html tags outside the xsl:otherwise section or use conditions (position=2) because then the html tags don't match up and the xslt document won't validate.

I'm new to XSL and must be missing something... ideas anyone?

==================================================
<xsl:key name="items-by-category" match="item" use="category" />
<xsl:template match="rss/channel">
<xsl:for-each select="item[count(. | key('items-by-category', category)[1]) = 1]">
<xsl:for-each select="key('items-by-category', category)">
<xsl:choose>
<xsl:when test="position() = 1">
<tr><td>item output format style 1</td></tr>
</xsl:when>

<xsl:otherwise>
item output format style 2 - includes all remaining items in the group

but I want to put all of these into a single TD as above, not each one in a separate TD?
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>

</xsl:for-each>

======================================================

Lefty
GeneralRe: XSL HTML table and matching tags problem Pin
DavidNohejl2-Jun-05 7:33
DavidNohejl2-Jun-05 7:33 
QuestionHow to remove node Pin
mathuros_paiboon1-Jun-05 15:38
mathuros_paiboon1-Jun-05 15:38 
AnswerRe: How to remove node Pin
Christian Graus1-Jun-05 15:46
protectorChristian Graus1-Jun-05 15:46 
GeneralRe: How to remove node Pin
mathuros_paiboon1-Jun-05 16:27
mathuros_paiboon1-Jun-05 16:27 
GeneralRe: How to remove node Pin
Christian Graus1-Jun-05 16:42
protectorChristian Graus1-Jun-05 16:42 
GeneralRe: How to remove node Pin
mathuros_paiboon1-Jun-05 17:02
mathuros_paiboon1-Jun-05 17:02 
GeneralRe: How to remove node Pin
Christian Graus1-Jun-05 17:07
protectorChristian Graus1-Jun-05 17:07 
GeneralRe: How to remove node Pin
mathuros_paiboon1-Jun-05 17:44
mathuros_paiboon1-Jun-05 17:44 
GeneralRe: How to remove node Pin
Christian Graus1-Jun-05 17:52
protectorChristian Graus1-Jun-05 17:52 
GeneralRe: How to remove node Pin
mathuros_paiboon1-Jun-05 18:32
mathuros_paiboon1-Jun-05 18:32 
AnswerRe: How to remove node Pin
niansah3-Jun-05 6:41
niansah3-Jun-05 6:41 
GeneralSImple Problem with XML Pin
CSharpDavid31-May-05 4:47
CSharpDavid31-May-05 4:47 
GeneralRe: SImple Problem with XML Pin
DavidNohejl31-May-05 7:08
DavidNohejl31-May-05 7:08 
GeneralRe: Simple Problem with XML Pin
CSharpDavid31-May-05 7:56
CSharpDavid31-May-05 7:56 
GeneralRe: SImple Problem with XML Pin
Christian Graus31-May-05 12:07
protectorChristian Graus31-May-05 12:07 
GeneralRe: SImple Problem with XML Pin
DavidNohejl31-May-05 12:20
DavidNohejl31-May-05 12:20 
GeneralRe: SImple Problem with XML Pin
Christian Graus31-May-05 12:22
protectorChristian Graus31-May-05 12:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.