![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Limit for-each display >Thread Next - Re: Limit for-each display Re: Limit for-each displayTo: NULL Date: 3/3/2004 9:36:00 PM In your unintelligible code (because of lack of any indentation) you have:
<xsl:value-of select="school/sports/announcements <= 2"
/>
Read about the xsl:value-of instruction and learn well that it operates only
on the first node of the nodeset specified in its "select" argument.
Instead, you need to use xsl:copy-of
Cheers,
Dimitre Novatchev [XML MVP],
FXSL developer, XML Insider,
http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html
"Matthew Tucker" <anonymous@d...> wrote in message
news:BA020E70-CA49-40C5-B6AC-9B66A7411534@m......
> I couldn't get it to work, here's a snippet of the XML:
>
> <?xml version="1.0"?><?xml-stylesheet type="text/xsl"
href="sports.xsl"?><!--!DOCTYPE school SYSTEM
""--><school><name><longname>Crooms Academy of Information
Technology</longname><shortname>Crooms
Academy</shortname><county>Seminole</county><city>Sanford</city><state>Flori
da</state></name><sports><announcements><mar1>Announcement
Mar-1</mar1><feb29>Extra Day Today!</feb29><feb28>Announcement
Feb-28</feb28></announcements></sports></school>
>
>
> And the XSL:
>
> <?xml version="1.0"?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template
match="/"><html><head><title>Crooms Academy Of Information
Technology</title><link href="sportspage/main.css" type="text/css"
rel="stylesheet" /></head><body><center><table border="1" width="80%"
bgcolor="#FFFFCC" id="SportsXML"><tr><td>Scores:<p><xsl:value-of
select="school/sports/announcements <= 2"
/></p></td></tr></table></center></body></html></xsl:template></xsl:styleshe
et>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
