xsl-list
[Top] [All Lists]

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

2005-01-24 22:44:15
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[(_at_)type='TITLE' and @language=$language],
                            $separator,
title_list/title[(_at_)type='SUBTITLE' and @language=$language])"/>

Cheers,

Juergen

--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>