[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Number of Recursive XSL Templates exceeded --> XML - P
********************************************************************* XSL FILE - PART 2 ******************************************************************** <xsl:variable name="session" select="/Response/Header/sessionId"/> <xsl:variable name="action" select="concat('/',$WEBROOT,'/acedispatcher')"/> <xsl:variable name="DMT_IMAGES" select="'images/dmt'"/> <xsl:variable name="DMT_XSLPAGES" select="'dmt/docs/xsl/'"/> <xsl:variable name="images" select="'images/dmt/'"/> <xsl:variable name="rowcolor1" select="'Details'"/> <xsl:variable name="rowcolor2" select="'altDetails'"/> <xsl:variable name="listcolor1" select="'listrow'"/> <xsl:variable name="listcolor2" select="'altlistrow'"/> <xsl:variable name="style" select="'font-size: 10px; font-family: Arial;'"/> <xsl:variable name="submit" select="'no'"/> <xsl:variable name="operators" select="'matches|=|<|>|<=|>=|<>|like|not like|is|is not|begins|ends'"/> <xsl:variable name="RECORDSNOTFOUND" select="'Records Not found'"/> <xsl:variable name="MENU" select="'1111111110'"/> <xsl:variable name="DETAIL_TABLE" select="'GenericDataFull'"/> <xsl:variable name="DETAIL_ROW" select="'Details'"/> <xsl:variable name="DETAIL_ALT_ROW" select="'altDetails'"/> <xsl:variable name="FILTER_TABLE" select="'GenericDataFull'"/> <xsl:variable name="FILTER_ROW" select="'Details'"/> <xsl:variable name="FILTER_ALT_ROW" select="'altDetails'"/> <xsl:variable name="ERRORMSG" select="'font-family: verdana, sans-serif;font-size: 8pt;color: Red;'"/> <xsl:variable name="RESULT_TABLE" select="'Data_Table_First_Row'"/> <xsl:variable name="RESULT_HEAD" select="'contentheaderrow'"/> <xsl:variable name="RESULT_ROW" select="'listrow'"/> <xsl:variable name="RESULT_ALT_ROW" select="'altlistrow'"/> <xsl:variable name="RESULT_FOOT" select="'listrow'"/> <xsl:variable name="HEADER" select="'1'"/> <xsl:variable name="SEARCHFILTER" select="'2'"/> <xsl:variable name="EDITMODE" select="'3'"/> <xsl:variable name="CHANGEVIEW" select="'4'"/> <xsl:variable name="ADDNEW" select="'5'"/> <xsl:variable name="DELETE" select="'6'"/> <xsl:variable name="SAVE" select="'7'"/> <xsl:variable name="BACK" select="'8'"/> <xsl:variable name="ROWSPERPAGE" select="'9'"/> <xsl:variable name="ADDNEWINTHESAMEPAGE" select="'10'"/> <xsl:variable name="COPYINSERT" select="'11'"/> <xsl:variable name="CSVUPLOAD" select="'12'"/> <xsl:variable name="EDIT" select="'13'"/> <xsl:variable name="DAASADD" select="'14'"/> <!--html--> <xsl:template match="/"> <xsl:call-template name="body"/> </xsl:template> <xsl:template name="body"> <body> <xsl:apply-templates/> </body> </xsl:template> <!-- Mandatory Field Representation--> <xsl:template name="mandatorystar"> <font color="red"> <xsl:value-of select="'*'"/> </font> </xsl:template> <!-- Mandatory Field Meaasage Representation--> <xsl:template name="mandatorymessage"> <table border="0" id="GenericDataFull" cellpadding="0" cellspacing="0"> <tr class="{$rowcolor1}"> <td nowrap="nowrap"> <font color="red">*</font> <xsl:value-of select="' indicates required field.'"/> </td> </tr> </table> </xsl:template> <!--save button--> <xsl:template name="save"> <xsl:param name="session"/> <xsl:param name="id"/> <xsl:param name="returnid"/> <xsl:param name="style"/> <xsl:choose> <xsl:when test="$returnid=''"> <form action="{$action}" name="savebusinessobjectwithoutreturn" method="post"> <input type="hidden" name="action" value="save"/> <input type="hidden" name="sessionId" value="{$session}"/> <input type="hidden" name="id" value="{$id}"/> <input type="hidden" name="style" value="{$style}.xsl"/> <input type="image" src="{$images}/save.gif" onclick="return validate()"/> <!--<img border="0" src="{$images}/save.gif" alt="Save" onclick="return validate()"/>--> <!--<img border="0" src="{$images}/save.gif" alt="Save" onclick="submit()"/>--> </form> <!-- <A href="{$action}?sessionId={$session}&id={$id}&action=save&style={$style}.xsl"> <img border="0" src="{$images}/save.gif" alt="Save"/> </A> --> </xsl:when> <xsl:otherwise> <!-- <A href="{$action}?sessionId={$session}&id={$id}&return={$returnid}&action=save&style={$style}.xsl"> <img border="0" src="{$images}/save.gif" alt="Save"/> </A> --> <form action="{$action}" name="savebusinessobjectwithreturn" method="post"> <input type="hidden" name="action" value="save"/> <input type="hidden" name="sessionId" value="{$session}"/> <input type="hidden" name="id" value="{$id}"/> <input type="hidden" name="return" value="{$returnid}"/> <input type="hidden" name="style" value="{$style}.xsl"/> <input type="image" src="{$images}/save.gif" onclick="return validate()"/> <!--<img border="0" src="{$images}/save.gif" alt="Save" onclick="return validate()"/>--> <!--<img border="0" src="{$images}/save.gif" alt="Save" onclick="submit()"/>--> </form> </xsl:otherwise> </xsl:choose> </xsl:template> <!--check box--> <xsl:template name="checkbox"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="submit"/> value is <xsl:value-of select="$value"/> <xsl:choose> <xsl:when test="$submit='yes' or $submit='Yes' or $submit='YES'"> <input type="checkbox" name="{$name}" value="{$value}" onclick="submit()"/> </xsl:when> <xsl:otherwise> <input type="checkbox" name="{$name}" value="{$value}"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="checkbox3"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="submit"/> value is <xsl:value-of select="$value"/> <xsl:choose> <xsl:when test="$submit='yes' or $submit='Yes' or $submit='YES'"> <xsl:choose> <xsl:when test="string($value)='1'"> <input type="checkbox" name="{$name}" value="{$value}" checked="checked" onclick="submit()"/> </xsl:when> <xsl:otherwise> <input type="checkbox" name="{$name}" value="{$value}" onclick="submit()"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="string($value)='1'"> <input type="checkbox" name="{$name}" value="{$value}" checked="checked"/> </xsl:when> <xsl:otherwise> <input type="checkbox" name="{$name}" value="{$value}"/> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <!--text box with reduced size for census,should be removed once the original textbox has a field for size--> <xsl:template name="hiddendmt"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="default"/> <xsl:param name="submit"/> <xsl:param name="disabled"/> <xsl:choose> <xsl:when test="$submit='yes' or $submit='Yes' or $submit='YES'"> <input type="hidden" name="{$name}" size="10" onblur="submit()"> <xsl:attribute name="value"><xsl:choose><xsl:when test="$value=''"><xsl:value-of select="$default"/></xsl:when><xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise></xsl:choose></xsl:attribute> </input> </xsl:when> <xsl:otherwise> <input type="hidden" name="{$name}" size="10"> <xsl:attribute name="value"><xsl:choose><xsl:when test="$value=''"><xsl:value-of select="$default"/></xsl:when><xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise></xsl:choose></xsl:attribute> </input> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="textbox11"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="default"/> <xsl:param name="submit"/> <xsl:param name="disabled"/> <xsl:param name="datatype1"/> <xsl:choose> <xsl:when test="$submit='yes' or $submit='Yes' or $submit='YES'"> <input type="text" name="{$name}" size="2" onblur="submit()"> <xsl:attribute name="value"><xsl:choose><xsl:when test="$value=''"><xsl:value-of select="$default"/></xsl:when><xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise></xsl:choose></xsl:attribute> </input> </xsl:when> <xsl:otherwise> <input type="text" name="{$name}" size="2"> <xsl:attribute name="value"><xsl:choose><xsl:when test="$value=''"><xsl:value-of select="$default"/></xsl:when><xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise></xsl:choose></xsl:attribute> <xsl:attribute name="onblur"> <xsl:text disable-output-escaping="yes"><![CDATA[javascript:validateData(this.value,']]></xsl:text> <xsl:value-of select="$datatype1"/> <xsl:text disable-output-escaping="yes"><![CDATA[')]]></xsl:text> </xsl:attribute> </input> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="textbox1"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="default"/> <xsl:param name="submit"/> <xsl:param name="disabled"/> <xsl:param name="datatype1"/> <xsl:choose> <xsl:when test="$submit='yes' or $submit='Yes' or $submit='YES'"> <input type="text" name="{$name}" size="10" onblur="submit()"> <xsl:attribute name="value"><xsl:choose><xsl:when test="$value=''"><xsl:value-of select="$default"/></xsl:when><xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise></xsl:choose></xsl:attribute> </input> </xsl:when> <xsl:otherwise> <input type="text" name="{$name}" size="10"> <xsl:attribute name="value"><xsl:choose><xsl:when test="$value=''"><xsl:value-of select="$default"/></xsl:when><xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise></xsl:choose></xsl:attribute> <xsl:attribute name="onblur"> <xsl:text disable-output-escaping="yes"><![CDATA[javascript:validateData(this.value,']]></xsl:text> <xsl:value-of select="$datatype1"/> <xsl:text disable-output-escaping="yes"><![CDATA[')]]></xsl:text> </xsl:attribute> </input> </xsl:otherwise> </xsl:choose> </xsl:template> <!--text box--> <xsl:template name="textbox"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="submit"/> <xsl:param name="disabled"/> <xsl:param name="size" select="25"/> <xsl:choose> <xsl:when test="$submit='yes' or $submit='Yes' or $submit='YES'"> <input type="text" name="{$name}" value="{$value}" onchange="submit()" style="{$style}" size="{$size}"/> </xsl:when> <xsl:when test="$submit=''"> <input type="text" name="{$name}" value="{$value}" style="{$style}" size="{$size}"/> </xsl:when> <xsl:when test="$submit!=''"> <input type="text" name="{$name}" value="{$value}" onchange="return {$submit}" style="{$style}" size="{$size}"/> </xsl:when> <xsl:otherwise> <input type="text" name="{$name}" value="{$value}" style="{$style}" size="{$size}"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!--text area--> <xsl:variable name="separator" select="'|'"/> <!-- SELECT BOX--> <xsl:template name="selectbox2"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="desc"/> <xsl:param name="disabled"/> <xsl:param name="style"/> <xsl:param name="primarykey_value"/> <xsl:param name="currentdate"/> <xsl:param name="modifiedby"/> <xsl:param name="objectname"/> <select name="{$name}" style="{$style}"> <xsl:attribute name="onchange">javascript:validate('<xsl:value-of select="$primarykey_value"/>','<xsl:value-of select="$currentdate"/>','<xsl:value-of select="$modifiedby"/>','<xsl:value-of select="$objectname"/>')</xsl:attribute> <xsl:if test="$disabled = 'yes'"> <xsl:attribute name="disabled">disabled</xsl:attribute> </xsl:if> <option/> <xsl:choose> <xsl:when test="$desc=''"> <xsl:call-template name="Option"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="$domain"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="Option1"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="$domain"/> <xsl:with-param name="desc" select="$desc"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </select> </xsl:template> <xsl:template name="selectboxwithnooption"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="desc"/> <xsl:param name="disabled"/> <xsl:param name="funcname"/> <xsl:param name="style"/> <select name="{$name}" style="{$style}"> <xsl:attribute name="onchange">javascript:if (document.readyState == 'complete') <xsl:value-of select="$funcname"/>; else;</xsl:attribute> <xsl:if test="$disabled = 'yes'"> <xsl:attribute name="disabled">disabled</xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="$desc=''"> <xsl:call-template name="Option"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="$domain"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="Option1"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="$domain"/> <xsl:with-param name="desc" select="$desc"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </select> </xsl:template> <xsl:template name="selectbox"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="desc"/> <xsl:param name="disabled"/> <xsl:param name="funcname"/> <xsl:param name="style"/> <xsl:param name="emptyoption" select="'true'"/> <select name="{$name}" style="{$style}"> <xsl:attribute name="onchange">javascript:if (document.readyState == 'complete') <xsl:value-of select="$funcname"/>; else;</xsl:attribute> <xsl:if test="$disabled = 'yes'"> <xsl:attribute name="disabled">disabled</xsl:attribute> </xsl:if> <xsl:if test="string($emptyoption) = 'true'"> <option/> </xsl:if> <xsl:choose> <xsl:when test="$desc=''"> <xsl:call-template name="Option"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="$domain"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="Option1"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="$domain"/> <xsl:with-param name="desc" select="$desc"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </select> </xsl:template> <xsl:template name="Option"> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="separator"/> <xsl:if test="$domain!=''"> <xsl:variable name="head"> <xsl:if test="contains($domain, $separator)"> <xsl:value-of select="substring-before($domain, $separator)"/> </xsl:if> <xsl:if test="not(contains($domain, $separator))"> <xsl:value-of select="$domain"/> </xsl:if> </xsl:variable> <option> <xsl:if test="$head=$value"> <xsl:attribute name="selected"><xsl:value-of select="'selected'"/></xsl:attribute> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="$head"/></xsl:attribute> <xsl:value-of select="$head"/> </option> <xsl:call-template name="Option"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="substring-after($domain, $separator)"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="Option1"> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="desc"/> <xsl:param name="separator"/> <xsl:if test="$domain!=''"> <xsl:variable name="head"> <xsl:if test="contains($domain, $separator)"> <xsl:value-of select="substring-before($domain, $separator)"/> </xsl:if> <xsl:if test="not(contains($domain, $separator))"> <xsl:value-of select="$domain"/> </xsl:if> </xsl:variable> <xsl:value-of select="$head"/> <xsl:variable name="headdesc"> <xsl:if test="contains($desc, $separator)"> <xsl:value-of select="substring-before($desc, $separator)"/> </xsl:if> <xsl:if test="not(contains($desc, $separator))"> <xsl:value-of select="$desc"/> </xsl:if> </xsl:variable> <option> <xsl:if test="$head=$value"> <xsl:attribute name="selected"><xsl:value-of select="'selected'"/></xsl:attribute> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="$head"/></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="$head"/></xsl:attribute> <xsl:value-of select="$headdesc"/> </option> <xsl:call-template name="Option1"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="substring-after($domain, $separator)"/> <xsl:with-param name="desc" select="substring-after($desc, $separator)"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="selectedValue"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="desc"/> <xsl:param name="disabled"/> <xsl:param name="funcname"/> <xsl:param name="style"/> <xsl:call-template name="Option3"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="$domain"/> <xsl:with-param name="desc" select="$desc"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:template> <xsl:template name="Option3"> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="desc"/> <xsl:param name="separator"/> <xsl:if test="$domain!=''"> <xsl:variable name="head"> <xsl:if test="contains($domain, $separator)"> <xsl:value-of select="substring-before($domain, $separator)"/> </xsl:if> <xsl:if test="not(contains($domain, $separator))"> <xsl:value-of select="$domain"/> </xsl:if> </xsl:variable> <xsl:variable name="headdesc"> <xsl:if test="contains($desc, $separator)"> <xsl:value-of select="substring-before($desc, $separator)"/> </xsl:if> <xsl:if test="not(contains($desc, $separator))"> <xsl:value-of select="$desc"/> </xsl:if> </xsl:variable> <xsl:if test="$head=$value"> <xsl:value-of select="$headdesc"/> </xsl:if> <xsl:if test="contains($domain,$separator) and contains($desc,$separator)"> <xsl:call-template name="Option3"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="substring-after($domain, $separator)"/> <xsl:with-param name="desc" select="substring-after($desc, $separator)"/> <xsl:with-param name="separator" select="$separator"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="Option2"> <xsl:param name="value"/> <xsl:param name="domain"/> <xsl:param name="separator"/> <xsl:param name="separator1"/> <xsl:if test="$domain!=''"> <xsl:variable name="head"> <xsl:if test="contains($domain, $separator)"> <xsl:value-of select="substring-before($domain, $separator)"/> </xsl:if> <xsl:if test="not(contains($domain, $separator))"> <xsl:value-of select="$domain"/> </xsl:if> </xsl:variable> <option> <xsl:attribute name="value"><xsl:value-of select="$head"/></xsl:attribute> <xsl:if test="$head=$value"> <xsl:attribute name="selected"><xsl:value-of select="'selected'"/></xsl:attribute> </xsl:if> <xsl:value-of select="$head"/> </option> <xsl:call-template name="Option2"> <xsl:with-param name="value" select="$value"/> <xsl:with-param name="domain" select="substring-after($domain, $separator)"/> <xsl:with-param name="separator" select="$separator"/> <!-- <xsl:with-param name="separator1" select="$separator1"/>--> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="checkbox4"> <xsl:param name="name"/> <xsl:param name="value"/> <xsl:param name="form"/> <xsl:variable name="submitType"> <xsl:call-template name="FormSubmitTemplate"> <xsl:with-param name="frames" select="$FRAMES"/> <xsl:with-param name="frmobj" select="$form"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="string($value)=''"> <input> <xsl:attribute name="type">hidden</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="0"/></xsl:attribute> </input> <input type="checkbox" name="checkbox1" onclick="{$submitType}"/> </xsl:when> <xsl:when test="string($value)='0'"> <input> <xsl:attribute name="type">hidden</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="0"/></xsl:attribute> </input> <input type="checkbox" name="checkbox1" onclick="{$form}.{$name}.value=1;{$submitType}"/> </xsl:when> <xsl:otherwise> <input> <xsl:attribute name="type">hidden</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="1"/></xsl:attribute> <xsl:attribute name="onclick">submit()</xsl:attribute> </input> <input type="checkbox" name="checkbox1" checked="checked" onclick="{$form}.{$name}.value=0;{$submitType}"/> </xsl:otherwise> </xsl:choose> </xsl:template>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|