OUTPUT.XML

From PARS
Revision as of 11:08, 7 July 2016 by Admin (talk | contribs)
Jump to navigationJump to search
Using XSLT and XML to generate a Student review.

This file is generated by PARS every time a Student review is run. It contains all of the Grading, Behaviour and Attendance data for a student (even data not visible on the review) as well as a number of other useful pieces of information.

How to generate an OUTPUT.XML file

The file can be found in the local PARS/TEMP folder after generating a review, usually:

C:\program files\SIMS\PARS .net\TEMP

To generate a review follow these steps, the review design you use does not affect the data that are outputted:

  • PARS main menu > Grading > Review periods
  • Add review period -> give a title.
  • Start and end dates should be at least the same as the grade entry period.
  • In the "Review description" columns select any template for the year group containing the pupil(s) who are to receive the final review. if you do not have a template configured, one can be found here
  • Tick the "More options" column if the review is to have G&T or EAL information.
  • Click accept -> Click on the period you just created -> "Generate a review period" -> Select the pupil(s) who have had data entered.
  • Once the report has run check the PARS TEMP folder for the file OUTPUT.XML. The TEMP folder is usually found here:
c:\program files\sims\pars .net\TEMP\

N.B. if you are unable to access your local PARS/TEMP folder (e.g. due to permissions), generate a student review so it is visible in your web browser. Edit the file name shown in the address bar so it says OUTPUT.XML (keep the rest of the path the same) and press Enter. This will show the output.xml file on screen. Right click -> View source to see the actual contents of the file, copy this into Notepad and save as OUTPUT.XML

Additional info

Student review designs use XSLT to layout the data in the OUTPUT.XML file, converting it to HTML in the final printable copy.

A Default slip design is available that shows all grades available in the OUTPUT.XML file, if grades are missing or duplicated in a student review this design is useful to see all of the available data in the OUTPUT.XML. Create a Student Review Period using this design with the same date range as your design being troubleshooted.

There are various free pieces of software that make it easier to work with XML and XSLT:

XMLfox rearranges the XML into a grid view and makes it easy to navigate through large files.

Notepad++ is a useful program for editing code and has settings for a wide range of different languages.

The best way to work on a Review periods design is to copy the XSLT review design text to a new text file called e.g. example.xsl. Place this file in a folder with an OUTPUT.XML file containing students who already have had the relevant data entered in PARS. Open the OUTPUT.XML file and insert this text at the very top:

<?xml-stylesheet type="text/xsl" href="example.xsl"?>


Now open the OUTPUT.XML file in Internet Explorer (other browsers may not work) and the final report will be generated. Make changes to the XSLT file, save then refresh the browser window to see the effect of the changes.

Default slip

The slip design below will show all grades that are available in the output.xml. Use this to determine whether the date range of your review period is correct and the correct elements are linked to each student/subject.

To add this slip design to PARS

Click the PARS main menu -> Grading -> Configure -> Review designer -> Add -> Give it a title e.g. "Default slip" -> Delete the code in the main text box, paste in the text from the box below, click "Accept" to save.

When grades are missing from a student review

Replace the review design in PARS with the design below. Do the grades appear in the resulting report? If they do not (and they are visible elsewhere in PARS) then it is most likely that the date range of the review period is incorrect. This should always be set to cover the whole school year, apart from in certain rare cases where attendance or behaviour data should only be gathered over a limited time period. If the grades do appear then the review design will need amending. If your review design has a function debugMode() near the top, set this to "true" to see the grade element codes that are being checked in each cell. Are these correct?


<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:my="http://whatever" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" >
	<xsl:template match="/" >
<html>
	<head>
	
<link rel="stylesheet" type="text/css" href="" />
<script type="text/javascript" src="" />
		<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"/>
		<title>all grades</title>			
		<style type="text/css">
body {font-family:calibri}

table
{
    border-collapse: collapse;
}
.studName{font-size:25pt; font-weight:bold;text-align:center;}
		</style>		
	</head>				
		<body bgcolor="white" TOPMARGIN="0"  onload="" >			
			<center>
				<xsl:apply-templates select="//STUDENT" >					
					<xsl:sort select="surname" order="ascending"/>					
				</xsl:apply-templates>	
			</center>
		</body>				
</html>		
	</xsl:template>
<xsl:template match="//STUDENT" >
<table class="oneStud" border="1" frame= "box" cellpadding="3" width="100%">
	<tr><td class="studName" colspan="8"><xsl:value-of select="forename"/> <xsl:value-of select="surname"/> (<xsl:value-of select="reg_group"/>)</td></tr>
	<tr><td>Subject</td><td>Class</td><td>ElementID</td><td>Description</td><td>CODE</td><td>Date</td><td>Ev_inst_id</td><td>SCHEME1</td><td>ACTUALMARK</td><td>COMMENTTEXT</td><td>SIMS Details</td></tr>	
	<xsl:apply-templates select="SUBJECTS" >				 
		<xsl:sort select="SUBJECTDESC" order="ascending"/>				
	</xsl:apply-templates>
</table>
<br/><br/>
	<br style="page-break-after: always"/>
</xsl:template>
	<xsl:template match="SUBJECTS" >
	<xsl:for-each select="CLASSES/GRADEISSUE">
		<tr>
			<td><xsl:value-of select="../../SUBJECTDESC"/></td>
			<td>
				<xsl:if test="../CLASSDESC=''">(Subject)</xsl:if>
				<xsl:value-of select="../CLASSDESC"/>
			</td>
			<td>				
				<xsl:value-of select="ELEMENTID"/>
			</td>
			<td>				
				<xsl:value-of select="DESCRIPTION"/>
			</td>
			<td>				
				<xsl:value-of select="CODE"/>
			</td>
			<td>				
				<xsl:value-of select="DATE"/>
			</td>
			<td>				
				<xsl:value-of select="EV_INST_ID"/>
			</td>
			<td>				
				<xsl:value-of select="SCHEME1"/>
			</td>
			<td>				
				<xsl:value-of select="ACTUALMARK"/>
			</td>
                        <td>				
				<xsl:value-of select="COMMENTTEXT"/>
			</td>			
			<td>				
				<xsl:value-of select="SIMSDETAIL"/>
			</td>			
		</tr>
		<xsl:if test="COMMENTTEXT!=''">
			<tr>
				<td colspan="8">COMMENTTEXT:<br/><br/>	<xsl:value-of select="COMMENTTEXT"/></td>
			</tr>
		</xsl:if>
	</xsl:for-each>
	</xsl:template>	
</xsl:stylesheet>