Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Showing a certain number of records within XSLT?



2:52 pm on Jun 16, 2004 (gmt 0)

10+ Year Member

Iam tryin to parse my XSLT so that it shows a number of lines instead of all of the line from my XML.

Anyone know a function or a web site dedicated to this sort of thing?


9:14 am on Jun 17, 2004 (gmt 0)

10+ Year Member

I'm not clear exactly what your asking. The select="xpath" in XSL selects those nodes you want. So for instance <xsl:value-of select="/x/y"/> would output the text() from the y children of top level x nodes.

[w3schools.com ] has a good basic introduction to XML and XSL.
I'd recommend reading the w3c recommendation [w3.org] and also the XSLT faq [dpawson.co.uk].

If your question was asking how to break a long list into groups then the 'Alternate nodes'/'Split a long list into groups' on the faq shows that.

Hope that helps.


11:22 am on Jun 14, 2004 (gmt 0)

10+ Year Member

If I wanted to create a string using XSLT how would I do it?

<xslt:value-of select="substring-after(substring-before(rss:title,' (platform: '),'news: ')"/>

Is the feed i wanna stick in a string variable..! Then by using Len() i want to be able to distinguish if there is a feed or not.


9:42 am on Jun 17, 2004 (gmt 0)

10+ Year Member

again not exactly clear what your looking for.

<xsl:text>some text</xsl:text>
<xsl:value-of select="."/>
will both create output strings.

something like
<xsl:if test="rss/channel/item/description">
{do something}

would determine if there is description in the rss xml but I know too little about rss to know this is the best approach. I expect the xpath would also depend which version rss your looking at.

The RSS forum [webmasterworld.com] might know better, although there's not much XSL talked there.


Featured Threads

Hot Threads This Week

Hot Threads This Month