473,395 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Must be a loop error

Hi.

I am new to XML. I am working on a pretty simple problem at the moment
but can't seem to figure out what I am doing wrong. I am trying to
print the last nameof every member listed in my file. However, all it
does is reprint the same last name over and over again.

What am I doing wrong? Below is the code I am using.
<xsl:template match="/">
<xsl:for-each select ="/MEMBER">
<xsl:apply-templates select="/MEMBER"/>
</xsl:for-each>
</xsl:template>

<xsl:template match="/MEMBER">
<xsl:value-of select="/MEMBER/@VALUE"/>
</xsl:template>

Jul 20 '05 #1
1 1116
In article <11**********************@f14g2000cwb.googlegroups .com>,
rosemm <ro****@ghc.org> wrote:
<xsl:for-each select ="/MEMBER">
<xsl:apply-templates select="/MEMBER"/>
</xsl:for-each>
For each MEMBER, this calls the template for each MEMBER. So for
10 members, it will call it 100 times! You just want

<xsl:apply-templates select="/MEMBER"/>
<xsl:value-of select="/MEMBER/@VALUE"/>


Then, for each of the 100, it gets the VALUE of the first one!
You want

<xsl:value-of select="@VALUE"/>

-- Richard
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Randy Harris | last post by:
I'm finding working with PrtDevMode a nightmare. Is there any particular reason that Microsoft didn't simply provide a PrinterName argument for printing a report? That seems like a pretty...
12
by: David Powell | last post by:
Because my work area won't have an Access programmer next year, I've been asked to rebuild their coded application as a set of modular tools. The idea is that a non-programmer will be able to...
3
by: deko | last post by:
I have a logging routine that's supposed to silently log errors caught by error handler code on certain functions. The problem is sometimes stuff happens and the error handler can get caught in a...
10
by: Cybertof | last post by:
Hello, Do you know why i get the error "Left hand side must be variable, property or indexer" with the following code : struct FundDataStruct { internal int quantity;
29
by: garyusenet | last post by:
I'm trying to investigate the maximum size of different variable types. I'm using INT as my starting variable for exploration. I know that the maximum number that the int variable can take is:...
20
by: fniles | last post by:
I am using VB.NET 2003, SQL 2000, and SqlDataReader. As I read data from tblA, I want to populate tblB. I use SQLDataReader for both tables. I do not use thread. When I ExecuteReader on tblB, I...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
2
by: yalbizu | last post by:
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; const int NO_OF_STUDENTS=20; struct studentType { string studentFName; string studentLName;
5
by: (2b|!2b)==? | last post by:
I get this error: The out parameter 'errMsg' must be assigned to before control leaves the current method when compiling the following code: public void ExecuteCommands(DDLCommands...
16
by: raylopez99 | last post by:
I am running out of printing paper trying to debug this...it has to be trivial, but I cannot figure it out--can you? Why am I not printing text, but just the initial string "howdy"? On the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.