开发者

XSL template structure for choosing latest event

I have a list grouped by Region and it currently shows all the items for each city. I want to reduce to only the most recent advisory for each city.

I have tried to use an xsl:for-each statement but I am messing up the names/parameters.

List is called mlc The list contains t开发者_StackOverflow社区he fields: Title City Region Advisory DateCreated TT (calculated number field to find the number of minutes from the DateCreated to end of today which I intended to use the smallest to find the most recent)

I have the list grouped by Region and it currently shows all the items for each city. I want to reduce to only the most recent advisory for each city.


I had a co-worker help me and the code goes like this. City is sorted ascending. Created is sorted descending.

<xsl:if test="not(preceding-sibling::Row[1]/@City) or preceding-sibling::Row[1]/@City!=@City">

Now each city is shown only once and it is the most recent advisory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜