Re: [xsl] get the first of the following with Attribute equals

Subject: Re: [xsl] get the first of the following with Attribute equals
From: Cedric Claus <claus_cedric@xxxxxxxxxxxxxxx>
Date: Wed, 05 Feb 2003 17:30:30 +0100
cknell@xxxxxxxxxx wrote:

[From:Cedric Claus <claus_cedric@xxxxxxxxxxxxxxx>]

I want to have only the *first *following with the attribute Type = title or with my test : <xsl:if test="./@position < following::element


[@type='title']/@position">

I'm having trouble understanding your requirement.

Is it that you want the first element with "paragraph" as the type attribute which follows each element with "title" as the type attribute? That seems plain, but what does the <xsl:if> element select?

That's got me puzzled. Could you elaborate on your explanation?


the goals of the XSl is to assemble inside the "group" tag one title and the following paragraphe before the next title

document xmlns:fo="http://www.w3.org/1999/XSL/Format";>

<elements>
      <element type="title" position="1">text1</element>
      <element type="paragraphe" position="2">text2</element>
      <element type="paragraphe" position="3">text3</element>
      <element type="title" position="4">text4</element>
      <element type="paragraphe" position="5">text5</element>
      <element type="paragraphe" position="6">text6</element>
  <element>

-->
      <group>
          <title>text1</title>
          <paragraphe>text2</paragraphe>
          <paragraphe>text3</paragraphe>
      </group>
  </element>
  <element>
      <group>
          <title>text4</title>
          <paragraphe>text5</paragraphe>
          <paragraphe>text6</paragraphe>
      </group>
  </element>


thanks for your solution and sorry to asked a faq :$





XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread