Hi
I have XML, it looks like this:
<root>
<shelf1>
<book>
<title>some title 1</title>
<author>some author 1</author>
</book>
<book>
<title>some title 2</title>
<author>some author 2</author>
</book>
<book>
<title>some title 3</title>
<author>some author 3</author>
</book>
<book>
<title>some title 4</title>
<author>some author 4</author>
</book>
</shelf1>
<shelf2>
<movie>
<title>some movie title 1</title>
<book_title>some title 1</book_title>
</movie>
<movie>
<title>some movie title 2</title>
<book_title>some title 4</book_title>
</movie>
</shelf2>
</root>
What I would like to do is to show all books and movies in one table. I
can do it. Problem is I don't know how to add a line number to ever row
in table.
My table looks like this.
Ln
1 some title 1 some author 1
1 some movie title 1
1 some title 2 some author 2
1 some title 3 some author 3
1 some title 4 some author 4
1 some movie title 2
And i would like it to look like this:
Ln
1 some title 1 some author 1
2 some movie title 1
3 some title 2 some author 2
4 some title 3 some author 3
5 some title 4 some author 4
6 some movie title 2
I know I can't use xsl:variables. Also position() isn't the best choice
(I think). How can I achieve what I want to achieve?
best regards
Mateusz [PEYN] Adamus
http://adamus.home.pl