home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method = "html" encoding = "iso-8859-1"/>
-
- <!-- Variables relate as follows:
-
- 'hc' gives header colour,'bgc' the overall display background
- colour and 'tbgc' the table background colour.
- All colours are in hexadecimal.
- 'width' gives the overall width of the display in pixels.-->
-
-
-
- <xsl:variable name ='hc'>#008080</xsl:variable>
- <xsl:variable name ='bgc'>#FFFFFF</xsl:variable>
- <xsl:variable name ='tbgc'>#008080</xsl:variable>
- <xsl:variable name ='width'>800</xsl:variable>
-
-
-
- <xsl:template match="/">
- <HTML>
- <HEAD>
-
- <TITLE>Complete Listing</TITLE>
- <STYLE TYPE = "text/css">
-
- A {font-weight: bold}
- A:link {color: slateblue; text-decoration: none;}
- A:active {color: blue; text-decoration: none;}
- A:visited{color: darkslateblue; text-decoration: none;}
- A:hover {color: red; text-decoration: underline;}
-
- </STYLE>
-
- <SCRIPT LANGUAGE="JavaScript">
- <xsl:comment>
- {
- var result;
-
- function convert(red,green,blue)
- {
- result = red+''+green+''+blue;
- document.write(result);
- }
- }
- </xsl:comment>
- </SCRIPT>
- <SCRIPT LANGUAGE="JavaScript">
- <xsl:comment>
-
-
- var days = new Array(8);
- days[1] = "Sunday";
- days[2] = "Monday";
- days[3] = "Tuesday";
- days[4] = "Wednesday";
- days[5] = "Thursday";
- days[6] = "Friday";
- days[7] = "Saturday";
- var months = new Array(13);
- months[1] = "January";
- months[2] = "February";
- months[3] = "March";
- months[4] = "April";
- months[5] = "May";
- months[6] = "June";
- months[7] = "July";
- months[8] = "August";
- months[9] = "September";
- months[10] = "October";
- months[11] = "November";
- months[12] = "December";
-
- function printDate()
- {
- var dateObj = new Date(document.lastModified)
- var minute = dateObj.getMinutes()
- if(minute<10)
- minute = "0"+minute;
- var hour = dateObj.getHours()
- if(hour<10)
- hour = "0"+hour;
- var wday = days[dateObj.getDay() + 1]
- var lmonth = months[dateObj.getMonth() + 1]
- var month = dateObj.getMonth()+1
- if(month<10)
- month = "0"+month;
- var date = dateObj.getDate()
- if(date<10)
- date = "0"+date;
- var fyear = dateObj.getYear()
- if(fyear<1900)
- fyear=fyear+1900;
- document.write("Report created : "+hour+": "+minute+", "+date+ "/ "+month+"/ "+fyear)
- // End
- }
-
- function printScenarioDate(hour,minute,day,month,year)
- {
- var lmonth = months[month]
- document.write("Scenario last modified : "+hour+": "+minute+", "+lmonth+" " +day+", "+year)
- }
- </xsl:comment>
- </SCRIPT>
-
- </HEAD>
-
-
- <BODY BGCOLOR = "{$bgc}">
-
- <CENTER>
- <TABLE>
- <TBODY>
- <TR>
- <TD VALIGN="TOP" WIDTH="73%" HEIGHT="15" BGCOLOR="$tbgc">
- <CENTER><FONT FACE="Arial" COLOR="#FFFFFF" SIZE="+1">Report</FONT>
- <br/><FONT FACE="Arial" COLOR="#FFFFFF" SIZE="+1">Complete Listing</FONT></CENTER>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </CENTER>
-
- <CENTER>
- <B><FONT FACE = "Times New Roman, Times, serif" color="#000000" size="3">
- <SMALL>
-
- <SCRIPT>
- printDate();
- </SCRIPT>
- <br/>
-
-
-
- </SMALL>
- </FONT>
- </B>
- </CENTER>
- <FONT SIZE = "+1">
- <xsl:apply-templates mode = "main"/>
-
-
- <xsl:apply-templates/>
- </FONT>
-
- </BODY>
-
- </HTML>
-
- </xsl:template>
-
-
-
-
-
-
-
- <xsl:template match = "assistumdocument" mode = "main">
- <xsl:for-each select = "assistumnetwork">
-
- <xsl:variable name = "headernumber">
- <xsl:number format = "1" count = "assistumnetwork"/>
- </xsl:variable>
-
- <xsl:variable name = "red" select = "network/networkname/colour/@red"/>
- <xsl:variable name = "green" select = "network/networkname/colour/@green"/>
- <xsl:variable name = "blue" select = "network/networkname/colour/@blue"/>
-
- <xsl:variable name = "colour" select = "concat($red,$green,$blue)"/>
-
- <!--SCRIPT>
- var red = <xsl:value-of select = "$red"/>;
- var green = <xsl:value-of select = "$green"/>;
- var blue = <xsl:value-of select = "$blue"/>;
- convert(red,green,blue);
- </SCRIPT-->
-
-
-
- <H3><FONT COLOR = "{$hc}">
- <xsl:value-of select = "$headernumber"/>
-
- <xsl:value-of select = "network/networkname/string"/>
-
- <br/>
- <br/>
- <xsl:if test = "string-length(network/scenarioname/string)!=0">
- <xsl:value-of select = "network/scenarioname/string"/>
- <br/>
- <br/>
-
- </xsl:if>
- <!--br/>
- <xsl:value-of select = "network/networkdescription/string"/-->
- </FONT></H3>
- <OL><xsl:for-each select = "node[not(disabled = 'true')]">
- <xsl:variable name = "number">
- <xsl:value-of select = "$headernumber"/>
- .
- <xsl:number value = "position()" format = "1"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test = "disabled = 'true'"/>
-
- <xsl:otherwise>
- <H3><FONT COLOR = "{$hc}">
-
- <xsl:value-of select = "$number"/>
- :
- <xsl:value-of select = "nodename/string"/></FONT></H3>
- <xsl:if test = "string-length(question/string) != 0">
- Question: <B><xsl:value-of select = "question/string"/></B>
- <br/>
- </xsl:if>
- <xsl:if test = "string-length(reason/string) != 0">
- Reference: <xsl:value-of select = "reason/string"/>
- <br/>
- </xsl:if>
-
- <xsl:choose>
-
- <xsl:when test = "answered = 'true'">
- <xsl:variable name = "answernumber">
- <xsl:variable name = "numbanswers" select = "(count(answer))"/>
- <xsl:value-of select = "((($numbanswers)-1)*(1-answervalue))+1"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test = "($answernumber*10) mod 10 = '5'">
- Answer: <B>Between <xsl:value-of select = "answer[index=ceiling($answernumber)]/string"/>
- and <xsl:value-of select = "answer[index=floor($answernumber)]/string"/></B>
- <br/>
- </xsl:when>
- <xsl:otherwise>
- Answer: <B><xsl:value-of select = "answer[index = round($answernumber)]/string"/></B>
- <br/>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test = "degreeoftruth = answervalue"/>
- <xsl:otherwise>
- <xsl:variable name = "machineanswernumber">
- <xsl:variable name = "numbanswers" select = "(count(answer))"/>
- <xsl:value-of select = "((($numbanswers)-1)*(1-degreeoftruth))+1"/>
- </xsl:variable>
- <FONT COLOR = "#FF0000">
- The Knowledge Base disagreed: It gave the following answer :
- </FONT>
- <br/>
- <xsl:choose>
- <xsl:when test = "($machineanswernumber*10) mod 10 = '5'">
- Answer: <B>Between <xsl:value-of select = "answer[index=ceiling($machineanswernumber)]/string"/>
- and <xsl:value-of select = "answer[index=floor($machineanswernumber)]/string"/></B>
- <br/>
- </xsl:when>
- <xsl:otherwise>
- Answer: <B><xsl:value-of select = "answer[index = round($machineanswernumber)]/string"/></B>
- <br/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
-
- <xsl:otherwise>
- <FONT COLOR = "#FF0000"><B>This question has not been answered</B></FONT>
- <br/>
- -<!--<xsl:if test = "default = 'true'">
- <xsl:variable name = "answernumber">
- <xsl:variable name = "numbanswers" select = "(count(answer))"/>
- <xsl:value-of select = "((($numbanswers)-1)*(1-defaultanswervalue))+1"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test = "($answernumber*10) mod 10 = '5'">
- Default Answer: <B>Between <xsl:value-of select = "answer[index=ceiling($answernumber)]/string"/>
- and <xsl:value-of select = "answer[index=floor($answernumber)]/string"/></B>
- </xsl:when>
- <xsl:otherwise>
- Default Answer: <B><xsl:value-of select = "answer[index = round($answernumber)]/string"/></B>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
-
- --></xsl:otherwise>
-
- </xsl:choose>
- <br/>
-
- <xsl:if test = "string-length(moreinfo) != 0">
- More Information: <xsl:value-of select = "moreinfo"/>
- <br/><br/>
- </xsl:if>
-
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test = "string-length(external/@linkedkb) != '0'">
- <xsl:call-template name = "linkednode">
- <xsl:with-param name = "kbref" select = "external/@linkedkb"/>
- <xsl:with-param name = "transfernumber" select = "$number"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- </OL>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name = "linkednode">
- <xsl:param name = "kbref"/>
- <xsl:param name = "transfernumber"/>
-
- <!--Number is :<xsl:value-of select = "$transfernumber"/-->
- <xsl:apply-templates select = "document($kbref)" mode = "heading"/>
- <xsl:apply-templates select = "document($kbref)" mode = "main">
- <xsl:with-param name = "currnumber" select = "$transfernumber"/>
- </xsl:apply-templates>
- </xsl:template>
-
-
-
- <xsl:template name = "lastmodified">
- <xsl:variable name = "datetime" select = "network/lastmodified"/>
-
- <xsl:variable name = "tempmonth" select = "substring-before($datetime,'/')"/>
- <xsl:variable name = "firstrem" select = "substring-after($datetime,'/')"/>
- <xsl:variable name = "tempday" select = "substring-before($firstrem,'/')"/>
- <xsl:variable name = "secondrem" select = "substring-after($firstrem,'/')"/>
- <xsl:variable name = "year" select = "substring-before($secondrem,' ')"/>
- <xsl:variable name = "thirdrem" select = "substring-after($secondrem,' ')"/>
- <xsl:variable name = "temphour" select = "substring-before($thirdrem,':')"/>
- <xsl:variable name = "fourthrem" select = "substring-after($thirdrem,':')"/>
- <xsl:variable name = "minute" select = "substring-before($fourthrem,':')"/>
- <xsl:variable name = "ampm" select = "substring-after($fourthrem,' ')"/>
- <xsl:variable name = "hour">
- <xsl:choose>
- <xsl:when test = "$ampm = 'PM'">
- <xsl:choose>
- <xsl:when test = "$temphour = '12'">
- <xsl:value-of select = "$temphour"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select = "$temphour + 12"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test = "$temphour = '12'">
- 00
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test = "$temphour < '10'">
- 0<xsl:value-of select = "$temphour"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select = "$temphour"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name = "day">
- <xsl:choose>
- <xsl:when test = "$tempday < '10'">
- 0<xsl:value-of select = "$tempday"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select = "$tempday"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name = "month">
- <xsl:choose>
- <xsl:when test = "$tempmonth < '10'">
- 0<xsl:value-of select = "$tempmonth"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select = "$tempmonth"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <CENTER>
- <FONT FACE = "Times New Roman, Times, serif" color="#000000" size="3">
- <SMALL>
- Scenario last modified :
- <xsl:value-of select = "$hour"/>:
- <xsl:value-of select = "$minute"/>,
- <xsl:value-of select = "$day"/>/
- <xsl:value-of select = "$month"/>/
- <xsl:value-of select = "$year"/>
-
- <!--SCRIPT>
- printScenarioDate(hour,minute,day,month,year);
- </SCRIP-->
- </SMALL>
- </FONT>
- </CENTER>
- </xsl:template>
- <xsl:template match = "assistumdocument"/>
-
- </xsl:stylesheet>
-
-
-
-
-
-
-
-
-
-