
-----------------------------------
StarGateSG-1
Thu Apr 13, 2006 7:34 am

XSLT problems
-----------------------------------
Hello,

I am having trouble getting all my fields in XSLT script to show, most of them show, but this one field doesn't.

I will attach the fiels when i figure out were the attach section is??

-----------------------------------
StarGateSG-1
Thu Apr 13, 2006 7:40 am


-----------------------------------
hmm...

Were is the add attachments?

O well I will post them.

Note: you will be able to see the problem right away.

This is the data file, the dats is test data though.




	
		
		
		
		
	

	
	
		
			90
			50
			75
			34
		
		
		
			67
			34
			53
			24
		
		
		
			67
			45
			75
			47
		
		
		
			47
			76
			47
			89
		
		
		
			19
			78
			86
			45
		
		
	
	
	
    	900
		950
		850
		700
	

	
		
		
		
	
	
	

This is the XSLT file.







Attendance Report by Period


Period
Total Students
Friday
Monday
Tuesday
Wednesday
Thursday



Period 1
#
%
%
%
%
%


Period 2
#
%
%
%
%
%


Period 3
#
%
%
%
%
%


Period 4
#
%
%
%
%
%







[/code]

-----------------------------------
rdrake
Thu Apr 13, 2006 3:03 pm


-----------------------------------
It looks like, while it's pulling data from the xml file, it's not pulling everything out.  Take a look at the line as follows: Now, it's pulling data from , right?  However, your  section has no data pulled from it.  You're trying to pull data that's not within the section the other data is contained in, it's on the same level as the parent from which you're extracting the data.

Now, as for a solution, I really don't know.  Just heard of XSLT myself, and I've had no time to investigate it further.

-----------------------------------
rdrake
Thu Apr 13, 2006 3:23 pm


-----------------------------------
Sorry for the double post, but I couldn't seem to edit my previous post...

Anyways, I've dug up a solution.  The level you want to get up to is one higher than where your for-each statement is looking, right?  So, you must go up a level before you can access the data.  This can be achieved as follows:So, you should have something like the following:






Attendance Report by Period


Period
Total Students
Friday
Monday
Tuesday
Wednesday
Thursday



Period 1
#
%
%
%
%
%


Period 2
#
%
%
%
%
%


Period 3
#
%
%
%
%
%


Period 4
#
%
%
%
%
%








