[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

tricky xsl pattern

Subject: tricky xsl pattern
From: "Mattias Konradsson" <preacher@xxxxxxxxxxx>
Date: Sat, 16 Oct 1999 23:12:13 +0200
tricky t patterns
ok, I've been pondering this problem for a while, perhaps someone can help
me :)

I have an article format that looks roughly like this

<article>
<metadata>
<author>Mattias</author>
</metadata>
<content>

<section>
some text here
</section>

<section>
some more text here
</section>

<section>
even more text here
</section>

</content>
<article>

using msxml and ie5 you're suppose to be able to view this article page by
page (the pages being the section tags), in xsl
I'm doing this by  having   <xsl:apply-templates select="section[0]"/> and
then using the XML DOM setting it to section[1], section[2]
or whatever, no problem. The thing im stumbling on is that at the end of the
section there's suppose to be information displayed from the metadata
tag, and as it is now that information gets displayed on every page instead
of just the last one, and I can't do something like   <xsl:if
test="context()
[end()]"> because the tree contains only one section node because of the
earlier template, thus it's in effect for every page. I need a filter
that  like, checks how many sections there are totally in the document, what
the current section being processed is and if it's the last insert that
information, but I'm not sure how to retrieve the numbers of sections while
in the section template, context() or something, heck I dunno.

If someone made any sense of that and could help I'd be immensely grateful
:)



------------------
Mattias  Konradsson



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.