To jest stara wersja strony!
Wizualizacja reguł RIF
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
< html>
<head>
<title>Ruleset Visualisation</title>
</head>
< body>
<div style="border: 1px solid #ff8400; background-color: #ffd45f; padding: 5px 5px 5px 5px;">
<div style="font-size: 25px; font-family: Verdana, Sans; font-weight: bold; padding: 0px 0px 0px 0px; margin-bottom: 10px;">Ruleset</div>
<xsl:for-each select="Ruleset/rule">
<div id="cond" style="border: 1px solid #5b5b5b; padding: 5px 5px 5px 5px; font-size: 13px; margin-bottom: 10px; background-color: #ffbb00;">
<div style="font-size: 18px; font-family: Verdana, Sans; font-weight: bold; padding: 0px; margin-bottom: 5px;">Rule <xsl:value-of select="position()"/></div>
<xsl:choose>
<xsl:when test="./formula/Implies/if/Or">
<div><b>One</b> of the conditions must be true
<ul>
<xsl:for-each select="./formula/Implies/if/Or/formula">
<xsl:choose>
<xsl:when test="./Equal">
<li><xsl:value-of select="./Equal/arg/Var"/> == <xsl:value-of select="./Equal/arg/Const"/></li>
</xsl:when>
<xsl:when test="./Uniterm">
<li><xsl:value-of select="./Uniterm/op/Const"/>(
<xsl:for-each select="./Uniterm/arg">
<xsl:choose>
<xsl:when test="./Var">
<i>var </i><xsl:value-of select="./Var"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./Const"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="position() != last()">
,
</xsl:if>
</xsl:for-each>
) == true</li>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</ul></div>
</xsl:when>
<xsl:when test="./formula/Implies/if/And">
<div><b>All</b> conditions must be true
<ul>
<xsl:for-each select="./formula/Implies/if/And/formula">
<xsl:choose>
<xsl:when test="./Equal">
<li><xsl:value-of select="./Equal/arg/Var"/> == <xsl:value-of select="./Equal/arg/Const"/></li>
</xsl:when>
<xsl:when test="./Uniterm">
<li><xsl:value-of select="./Uniterm/op/Const"/>(
<xsl:for-each select="./Uniterm/arg">
<xsl:choose>
<xsl:when test="./Var">
<i>var </i><xsl:value-of select="./Var"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./Const"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="position() != last()">
,
</xsl:if>
</xsl:for-each>
) == true</li>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</ul></div>
</xsl:when>
<xsl:otherwise>
<div>Condition must be true<br/>
<xsl:choose>
<xsl:when test="./formula/Implies/if/formula/Equal">
<xsl:value-of select="./formula/Implies/if/formula/Equal/arg/Var"/> == <xsl:value-of select="./formula/Implies/if/formula/Equal/arg/Const"/>
</xsl:when>
<xsl:when test="./formula/Implies/if/formula/Uniterm">
<xsl:value-of select="./formula/Implies/if/formula/Uniterm/op/Const"/>(
<xsl:for-each select="./formula/Implies/if/formula/Uniterm/arg">
<xsl:choose>
<xsl:when test="./Var">
<i>var</i> <xsl:value-of select="./Var"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./Const"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="position() != last()">
,
</xsl:if>
</xsl:for-each>
) == true
</xsl:when>
</xsl:choose>
</div>
</xsl:otherwise>
</xsl:choose>
<div id="cond">
<b>then </b> <xsl:value-of select="./formula/Implies/then/Uniterm/op/*"/>(
<xsl:for-each select="./formula/Implies/then/Uniterm/arg">
<xsl:choose>
<xsl:when test="./Var">
<i>var </i> <xsl:value-of select="./Var"/>
</xsl:when>
<xsl:when test="./Const">
<xsl:value-of select="./Const"/>
</xsl:when>
</xsl:choose>
<xsl:if test="position() != last()">
,
</xsl:if>
</xsl:for-each>
)</div>
</div>
</xsl:for-each>
</div>
< /body>
< /html>
</xsl:template>
</xsl:stylesheet>
Powrót do dokumentu