[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: Re: How to return a result for just the first group
From: "Juergen" <xsl@xxxxxxxxxxxxxxx>
Date: Tue, 25 Jan 2005 06:44:15 +0100
concat group by
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.