Re: [xsl] How to return a result for just the first group

Subject: Re: [xsl] How to return a result for just the first group
From: "Juergen" <xsl@xxxxxxxxxxxxxxx>
Date: Tue, 25 Jan 2005 06:44:15 +0100
Hi Kevin,

What I want to do is generate text by concatenating the title and
subtitle of the first language:


<snip>


<title_list>
<title type="TITLE" language="de">Gummi- und Kunststoffschlaeuche und -schlauchleitungen mit Drahteinlage; Hydraulik-Impulspruefung mit wechselnder Biegung (ISO 6802:1991)</title>
<title type="TITLE" language="en">Rubber and plastics hose and hose assemblies with wire reinforcements; hydraulic impulse test with flexing (ISO 6802:1991)</title></title>
<title type="SUBTITLE" language="en">german version EN 26802:1993</title>
</title_list>
<title type="SUBTITLE" language="de">Deutsche Fassung EN 26802:1993</title>



Select the language in a variable first entry or fix with 'de'. <xsl:variable name="language" select="titlelist/title[1]/@language"/>

Then concat, condition language added, that's all.
<xsl:value-of select="concat(title_list/title[@type='TITLE' and @language=$language],
$separator,
title_list/title[@type='SUBTITLE' and @language=$language])"/>


Cheers,

Juergen

Current Thread