PHP Classes

File: residential.xsl

Recommend this page to a friend!
  Classes of Tom Schaefer   QXML   residential.xsl   Download  
File: residential.xsl
Role: Auxiliary data
Content type: text/plain
Description: Sample XSL for FusionChart Sample
Class: QXML
XML <> Array (preserve attrib.), JSON, etc.
Author: By
Last change: - wrong file type , now changed
Date: 15 years ago
Size: 9,613 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="utf-8" /> <!-- PARAMETER --> <xsl:include href="./green1.xsl" /> <!-- GRAPH --> <xsl:template match="/"> <graph> <xsl:attribute name="showTaskNames"> <xsl:value-of select="$chart-showTaskNames" /> </xsl:attribute> <xsl:attribute name="extendcategoryBg"> <xsl:value-of select="$chart-extendcategoryBg" /> </xsl:attribute> <xsl:attribute name="dateformat"> <xsl:value-of select="$chart-dateformat" /> </xsl:attribute> <xsl:attribute name="hoverCapBorderColor"> <xsl:value-of select="$color6" /> </xsl:attribute> <xsl:attribute name="hoverCapBgColor"> <xsl:value-of select="$color5" /> </xsl:attribute> <xsl:attribute name="ganttWidthPercent"> <xsl:value-of select="$chart-ganttWidthPercent" /> </xsl:attribute> <xsl:attribute name="ganttLineAlpha"> <xsl:value-of select="$chart-ganttLineAlpha" /> </xsl:attribute> <xsl:attribute name="canvasBorderColor"> <xsl:value-of select="$color7" /> </xsl:attribute> <xsl:attribute name="canvasBorderThickness"> <xsl:value-of select="$chart-canvasBorderThickness" /> </xsl:attribute> <xsl:attribute name="gridBorderColor"> <xsl:value-of select="$color8" /> </xsl:attribute> <xsl:attribute name="gridBorderAlpha"> <xsl:value-of select="$chart-gridBorderAlpha" /> </xsl:attribute> <xsl:attribute name="baseFontColor"> <xsl:value-of select="$color3" /> </xsl:attribute> <xsl:apply-templates /> </graph> </xsl:template> <!-- CATEGORIES --> <xsl:template match="/graph/categories"> <xsl:for-each select="node()"> <xsl:choose> <xsl:when test="position()='1'"> <xsl:call-template name="categories1" /> </xsl:when> <xsl:when test="position()='2'"> <xsl:call-template name="categories2" /> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:template> <xsl:template name="categories1" match="/graph/categories[1]"> <categories> <xsl:attribute name="position"> <xsl:value-of select="position()" /> </xsl:attribute> <xsl:attribute name="bgColor"> <xsl:value-of select="$color1" /> </xsl:attribute> <xsl:attribute name="fontColor"> <xsl:value-of select="$color2" /> </xsl:attribute> <xsl:attribute name="fontSize"> <xsl:value-of select="$fontsize1" /> </xsl:attribute> <xsl:attribute name="isBold"> <xsl:value-of select="1" /> </xsl:attribute> <xsl:call-template name="cat1" /> </categories> </xsl:template> <xsl:template name="categories2" match="/graph/categories[2]"> <categories> <xsl:attribute name="position"> <xsl:value-of select="position()" /> </xsl:attribute> <xsl:attribute name="bgColor"> <xsl:value-of select="$color2" /> </xsl:attribute> <xsl:attribute name="fontColor"> <xsl:value-of select="$color1" /> </xsl:attribute> <xsl:attribute name="fontSize"> <xsl:value-of select="$fontsize4" /> </xsl:attribute> <xsl:attribute name="bgAlpha"> <xsl:value-of select="40" /> </xsl:attribute> <xsl:attribute name="align"> <xsl:value-of select="center" /> </xsl:attribute> <xsl:attribute name="isBold"> <xsl:value-of select="1" /> </xsl:attribute> <xsl:call-template name="cat2" /> </categories> </xsl:template> <xsl:template match="/graph/categories[2]/category" name="cat2"> <xsl:for-each select="node()"> <xsl:if test="@name != ''"> <category> <xsl:attribute name="start"> <xsl:value-of select="@start" /> </xsl:attribute> <xsl:attribute name="end"> <xsl:value-of select="@end" /> </xsl:attribute> <xsl:attribute name="name"> <xsl:value-of select="@name" /> </xsl:attribute> </category> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template match="/graph/categories[1]/category" name="cat1"> <xsl:for-each select="node()"> <xsl:if test="@name != ''"> <category> <xsl:attribute name="start"> <xsl:value-of select="@start" /> </xsl:attribute> <xsl:attribute name="end"> <xsl:value-of select="@end" /> </xsl:attribute> <xsl:attribute name="name"> <xsl:value-of select="@name" /> </xsl:attribute> </category> </xsl:if> </xsl:for-each> </xsl:template> <!-- PROCESSES --> <xsl:template match="/graph/processes"> <xsl:choose> <xsl:when test="count(//process)> 0"> <processes> <xsl:attribute name="bgColor"> <xsl:value-of select="$color2" /> </xsl:attribute> <xsl:apply-templates /> </processes> </xsl:when> <xsl:otherwise> <processes>No Process defined</processes> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="/graph/processes/process"> <process> <xsl:if test="@name != ''"> <xsl:attribute name="name"> <xsl:value-of select="@name" /> </xsl:attribute> </xsl:if> <xsl:if test="@id != ''"> <xsl:attribute name="id"> <xsl:value-of select="@id" /> </xsl:attribute> </xsl:if> <xsl:apply-templates /> </process> </xsl:template> <!-- DATA --> <xsl:template match="/graph/dataTable"> <xsl:choose> <xsl:when test="count(//dataColumn/text) > 0"> <dataTable> <xsl:attribute name="bgColor"> <xsl:value-of select="$color2" /> </xsl:attribute> <xsl:attribute name="fontColor"> <xsl:value-of select="$color1" /> </xsl:attribute> <xsl:attribute name="fontSize"> <xsl:value-of select="$fontsize3" /> </xsl:attribute> <xsl:attribute name="isBold"> <xsl:value-of select="1" /> </xsl:attribute> <xsl:attribute name="headerFontColor"> <xsl:value-of select="$color3" /> </xsl:attribute> <xsl:attribute name="headerFontSize"> <xsl:value-of select="$fontsize3" /> </xsl:attribute> <xsl:apply-templates /> </dataTable> </xsl:when> <xsl:otherwise> <dataTable>No Data defined.</dataTable> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="/graph/dataTable/dataColumn"> <dataColumn> <xsl:attribute name="bgColor"> <xsl:value-of select="$color2" /> </xsl:attribute> <xsl:attribute name="headerBgColor"> <xsl:value-of select="$color1" /> </xsl:attribute> <xsl:attribute name="headerFontColor"> <xsl:value-of select="$color2" /> </xsl:attribute> <xsl:attribute name="headerFontSize"> <xsl:value-of select="$fontsize1" /> </xsl:attribute> <xsl:attribute name="width"> <xsl:value-of select="$col1" /> </xsl:attribute> <xsl:attribute name="headerAlign"> <xsl:value-of select="left" /> </xsl:attribute> <xsl:if test="@headerText != ''"> <xsl:attribute name="headerText"> <xsl:value-of select="@headerText" /> </xsl:attribute> </xsl:if> <xsl:apply-templates /> </dataColumn> </xsl:template> <xsl:template match="/graph/dataTable/dataColumn/text"> <xsl:if test="@label != ''"> <text> <xsl:attribute name="label"> <xsl:value-of select="@label" /> </xsl:attribute> </text> </xsl:if> </xsl:template> <!-- TASKS --> <xsl:template match="/graph/tasks"> <xsl:choose> <xsl:when test="count(//task)> 0"> <tasks> <xsl:apply-templates /> </tasks> </xsl:when> <xsl:otherwise> <tasks>No Tasks defined.</tasks> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="/graph/tasks/task"> <task> <xsl:attribute name="color"> <xsl:value-of select="$color2" /> </xsl:attribute> <xsl:attribute name="topPadding"> <xsl:value-of select="$task-topPadding" /> </xsl:attribute> <xsl:attribute name="alpha"> <xsl:value-of select="$task-alpha" /> </xsl:attribute> <xsl:apply-templates /> </task> </xsl:template> <!-- CONNECTORS --> <xsl:template match="/graph/connectors"> <xsl:if test="count(//connector)> 0"> <connectors> <xsl:apply-templates /> </connectors> </xsl:if> </xsl:template> <xsl:template match="/graph/connector/connector"> <connector> <xsl:attribute name="color"> <xsl:value-of select="$connector-color" /> </xsl:attribute> <xsl:attribute name="thickness"> <xsl:value-of select="$connector-thickness" /> </xsl:attribute> <xsl:apply-templates /> </connector> </xsl:template> <!-- MILESTONES --> <xsl:template match="/graph/milestones"> <xsl:if test="count(//milestone)> 0"> <milestones> <xsl:apply-templates /> </milestones> </xsl:if> </xsl:template> <xsl:template match="/graph/milestones/milestone"> <milestone> <xsl:attribute name="radius"> <xsl:value-of select="$milestone-radius" /> </xsl:attribute> <xsl:attribute name="color"> <xsl:value-of select="$milestone-color" /> </xsl:attribute> <xsl:attribute name="shape"> <xsl:value-of select="$milestone-shape" /> </xsl:attribute> <xsl:attribute name="numSides"> <xsl:value-of select="$milestone-numSides" /> </xsl:attribute> <xsl:attribute name="borderThickness"> <xsl:value-of select="$milestone-borderThickness" /> </xsl:attribute> <xsl:apply-templates /> </milestone> </xsl:template> </xsl:stylesheet>