|
Subject: Re: [xsl] xsl for-each and preceding-sibling From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Wed, 16 Jan 2013 13:46:37 +0100 |
<list>
<entry>
<statistics val="warn">
<time>19:15:57</time>
<text>something happened</text>
</statistics>
</entry>
<entry>
<statistics val="info">
<time>19:10:50</time>
<text>went better</text>
</statistics>
</entry>
<entry>
<statistics val="error">
<time>15:00:00</time>
<text>big trouble</text>
</statistics>
</entry>
</list>
But the problem I get with the 'summary' I want to produce using the statistics.xsl stylesheet, which looks like this:
<?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="entry/statistics">
<xsl:for-each select=".">
<xsl:variable name="end"><xsl:value-of select="preceding-sibling::statistics[1]/time"/></xsl:variable>
<xsl:variable name="start"><xsl:value-of select="time"/></xsl:variable>
Doing
<xsl:variable name="start" select="time"/>
is shorter, easier and more efficient.| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] xsl for-each and preceding-si, Raimund Kammering | Thread | [xsl] XML Prague Call for Poster 20, Jim Fuller |
| [xsl] xsl for-each and preceding-si, Raimund Kammering | Date | RE: [xsl] Saxon 9.4 <bold></bold> T, Raymond Lillibridge |
| Month |