homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

Showing a certain number of records within XSLT?

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

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)

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)

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)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved