[xsl] Retrieving info between two tags.

Subject: [xsl] Retrieving info between two tags.
From: "Maxine Pensyl-Johnson" <Maxine.Pensyl-Johnson@xxxxxxx>
Date: Thu, 30 Aug 2007 08:06:05 -0700
Greetings everyone,

I have a situation where I need to define separate out puts for each
para tag within the step1 tag. So I've created a <step1> template and in
it I test the para number and output the correct formatting. For the
first para it outputs the para followed by the seqlist.

The second para's are where I'm having some difficulty. I need pull the
text from the second para into a table row. Then  and pull the item tags
into another row.

So my question is what's the best way to retrieve the non-nested
information in a tag?

SAXON 6.5.5

Example tags:


In this situation I need to retrieve the text between <para> &
<seqlist>. Originally I tried <xsl:apply-templates select="para[2]". But
that gave me


The para[2] template match pulled in the seqlist formatting.

So then I tried the value-of select="para[2]" and that gave me

Para2 1 2 3

How can I select and output only what's between <para[2]> and <seqlist>?

       <xsl:when test="para[2]">
               <td style="PADDING-RIGHT: 2px"><xsl:number
count="//step1[para[2]]" format="1."/></td>
               <td><xsl:value-of select="para"/></td>

Current Thread