⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 control.xsl~

📁 《jsp编程起步》里面的所有源代码
💻 XSL~
字号:
<xsl:stylesheet parsed-content=false><#@ cache #><#!  int unique = 0;  /**   * Calculate a runtime attribute or a string.   */  String _ct_rta(Node node, String attr)  {    Element elt = (Element) node;    String value = elt.getAttribute(attr);    if (value == null)      return "\"\"";    if (value.startsWith("<%=") && value.endsWith("%>"))      return value.substring(3, value.length() - 2);    else      return "\"" + value + "\"";   }#><!--   - An if statement   -   - <ct:if test='request.getParameter("color").equals("blue")'>   - boy   - </ct:if>  -->ct:if[@test]<<<% if (<{@test}>) { %>  <xsl:apply-templates/><% } %>>><!--   - A parameter test statement   -   - <ct:if param='color' value='blue'>   - boy   - </ct:if>  -->ct:if[@param]<<<% if ((<#= _ct_rta(node, "value") #>).equals(request.getParameter(<#= _ct_rta(node, "param") #>))) { %>  <xsl:apply-templates/><% } %>>><!--   - A generic switch statement   -   - <ct:switch select='<%= request.getParameter("color") %>'>   - <ct:case value='blue'>boy</ct:case>   - <ct:case value='ping'>girl</ct:case>   - <ct:default>furry creature from alpha centauri</ct:default>   - </ct:switch>  -->ct:switch[@select]<<<# String id = "_ct_tmp" + unique++; #><% Object <#= id #> = <#= _ct_rta(node, "select") #>; %><% if (<#= id #> == null) { %>  <xsl:apply-templates select='ct:default[1]/node()'/><% }<xsl:for-each select='ct:case'>  else if (<#= id #>.equals(<#= _ct_rta(node1, "value") #>)) { %>  <xsl:apply-templates/><% }</xsl:for-each><xsl:for-each select='ct:default[1]'>  else { %>  <xsl:apply-templates/><% }</xsl:for-each>%>>><!--   - An enumeration statement   -   - <ct:enum name='header' type='String' select='request.getHeaderNames()'>   -   <jsp:get name='header'/>: <jsp:get   - </ct:enum>  -->ct:enum<<<%@ page import='java.util.*' %><# String id = "_ct_tmp" + unique++; #><%   Enumeration <#= id #> = <{@select}>;    while (<#= id #>.hasMoreElements()) {     <{@type}> <{@name}> = (<{@type}>) <#= id #>.nextElement();%>  <xsl:apply-templates/><%  }%>>></xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -