Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Limit for-each display

From: "Dimitre Novatchev [MVP XML]" <dnovatchev@-----.--->
To: 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 &lt;= 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 &lt;= 2"
/></p></td></tr></table></center></body></html></xsl:template></xsl:styleshe
et>




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent