[xsl] xsl, position, template Problem

Subject: [xsl] xsl, position, template Problem
From: "Partho Paul" <uk4u@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Jan 2001 12:36:29 +0100
To make things clear, my previous mail was confusing:
I have the following xml Structure:

                                 Para
                            /  |  \    \             \ 
                        /      |     \     \             \
                    /          |        \     \                \
                /              |          \      \                  \
            Text   StretchText  Text   StretchText  Text

Now I want to give out the Text and count the Stretchtext-Tags,
but the code below didn't work.

Partho

>I have the following xml given:
>
><Para>
>Some useful Text
><Stretchext>Bla Bla - some usefule thing</Stretchext>
>Another useful text
><Stretchext>Bla Bla - some usefule thing</Stretchext>
>Further useful text
></Para>
>
>The Probelm is, how to create a xsl Stylesheet?
>
>I used the following:
>....
><xsl:template match="Para">
><xsl:apply-templates select="//Stretchtext"/>
></xsl:template>
>
><xsl:template match="Stretchtext"/>
><xsl:value-of select="position()"/>
></xsl:template>
>---------------------------------------------------------
>Problem:
>
>The problem now is that the function postion() works well, but
>I don't get the output of the text from the xml File.
>If I do the following:
>
><xsl:template match="Para">
><xsl:apply-templates />
></xsl:template>
>
>I do get the output of the texts, but now the function position()
>dos not count correctly.
>
>So how can I get the output of the text according to its occurance
>and count the Stretchtext-Tags correctly.
>
>Thank you.
>
>Partho


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


Current Thread