cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Smith" <msm...@windebt.com>
Subject xsl:selecting the first matching element and no more
Date Fri, 22 Sep 2000 19:29:37 GMT
	Let's say I've got the following xml:
<language type="oo">c++</language>
<language type="scripting">javascript</language>
<someparent>
   <language type="scripting">php</language>
   <language type="oo">java</language>
   <language type="markup">html</language>
</someparent>
<language type="scripting">perl</language>
	And I want to apply templates to a language who's type equals some
variable, like this:
<xsl:apply-templates select="//language[@type=$thetype]" />
	But I only want to process one.. the first one in document.  I thought I
could select that with:
<xsl:apply-templates select="//language[@type=$thetype][1]" />
	But this isn't working.  How could I accomplish this?

Thanks,
Matt


Mime
View raw message