fn.tld
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:7k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
  3.   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
  5.   version="2.0">
  6.     
  7.   <description>JSTL 1.1 functions library</description>
  8.   <display-name>JSTL functions</display-name>
  9.   <tlib-version>1.1</tlib-version>
  10.   <short-name>fn</short-name>
  11.   <uri>http://java.sun.com/jsp/jstl/functions</uri>
  12.   <function>
  13.     <description>
  14.       Tests if an input string contains the specified substring.
  15.     </description>
  16.     <name>contains</name>
  17.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  18.     <function-signature>boolean contains(java.lang.String, java.lang.String)</function-signature>
  19.     <example>
  20.       &lt;c:if test="${fn:contains(name, searchString)}">
  21.     </example>
  22.   </function>
  23.   <function>
  24.     <description>
  25.       Tests if an input string contains the specified substring in a case insensitive way.
  26.     </description>
  27.     <name>containsIgnoreCase</name>
  28.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  29.     <function-signature>boolean containsIgnoreCase(java.lang.String, java.lang.String)</function-signature>
  30.     <example>
  31.       &lt;c:if test="${fn:containsIgnoreCase(name, searchString)}">
  32.     </example>
  33.   </function>
  34.   <function>
  35.     <description>
  36.       Tests if an input string ends with the specified suffix.
  37.     </description>
  38.     <name>endsWith</name>
  39.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  40.     <function-signature>boolean endsWith(java.lang.String, java.lang.String)</function-signature>
  41.     <example>
  42.       &lt;c:if test="${fn:endsWith(filename, ".txt")}">
  43.     </example>
  44.   </function>
  45.   <function>
  46.     <description>
  47.       Escapes characters that could be interpreted as XML markup.
  48.     </description>
  49.     <name>escapeXml</name>
  50.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  51.     <function-signature>java.lang.String escapeXml(java.lang.String)</function-signature>
  52.     <example>
  53.       ${fn:escapeXml(param:info)}
  54.     </example>
  55.   </function>
  56.   <function>
  57.     <description>
  58.       Returns the index withing a string of the first occurrence of a specified substring.
  59.     </description>
  60.     <name>indexOf</name>
  61.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  62.     <function-signature>int indexOf(java.lang.String, java.lang.String)</function-signature>
  63.     <example>
  64.       ${fn:indexOf(name, "-")}
  65.     </example>
  66.   </function>
  67.   <function>
  68.     <description>
  69.       Joins all elements of an array into a string.
  70.     </description>
  71.     <name>join</name>
  72.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  73.     <function-signature>java.lang.String join(java.lang.String[], java.lang.String)</function-signature>
  74.     <example>
  75.       ${fn:join(array, ";")}
  76.     </example>
  77.   </function>
  78.   <function>
  79.     <description>
  80.       Returns the number of items in a collection, or the number of characters in a string.
  81.     </description>
  82.     <name>length</name>
  83.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  84.     <function-signature>int length(java.lang.Object)</function-signature>
  85.     <example>
  86.       You have ${fn:length(shoppingCart.products)} in your shopping cart.
  87.     </example>
  88.   </function>
  89.   <function>
  90.     <description>
  91.       Returns a string resulting from replacing in an input string all occurrences
  92.       of a "before" string into an "after" substring.
  93.     </description>
  94.     <name>replace</name>
  95.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  96.     <function-signature>java.lang.String replace(java.lang.String, java.lang.String, java.lang.String)</function-signature>
  97.     <example>
  98.       ${fn:replace(text, "-", "&#149;")}
  99.     </example>
  100.   </function>
  101.   <function>
  102.     <description>
  103.       Splits a string into an array of substrings.
  104.     </description>
  105.     <name>split</name>
  106.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  107.     <function-signature>java.lang.String[] split(java.lang.String, java.lang.String)</function-signature>
  108.     <example>
  109.       ${fn:split(customerNames, ";")}
  110.     </example>
  111.   </function>
  112.   <function>
  113.     <description>
  114.       Tests if an input string starts with the specified prefix.
  115.     </description>
  116.     <name>startsWith</name>
  117.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  118.     <function-signature>boolean startsWith(java.lang.String, java.lang.String)</function-signature>
  119.     <example>
  120.       &lt;c:if test="${fn:startsWith(product.id, "100-")}">
  121.     </example>
  122.   </function>
  123.   <function>
  124.     <description>
  125.       Returns a subset of a string.
  126.     </description>
  127.     <name>substring</name>
  128.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  129.     <function-signature>java.lang.String substring(java.lang.String, int, int)</function-signature>
  130.     <example>
  131.       P.O. Box: ${fn:substring(zip, 6, -1)}
  132.     </example>
  133.   </function>
  134.   <function>
  135.     <description>
  136.       Returns a subset of a string following a specific substring.
  137.     </description>
  138.     <name>substringAfter</name>
  139.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  140.     <function-signature>java.lang.String substringAfter(java.lang.String, java.lang.String)</function-signature>
  141.     <example>
  142.       P.O. Box: ${fn:substringAfter(zip, "-")}
  143.     </example>
  144.   </function>
  145.   <function>
  146.     <description>
  147.       Returns a subset of a string before a specific substring.
  148.     </description>
  149.     <name>substringBefore</name>
  150.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  151.     <function-signature>java.lang.String substringBefore(java.lang.String, java.lang.String)</function-signature>
  152.     <example>
  153.       Zip (without P.O. Box): ${fn:substringBefore(zip, "-")}
  154.     </example>
  155.   </function>
  156.   <function>
  157.     <description>
  158.       Converts all of the characters of a string to lower case.
  159.     </description>
  160.     <name>toLowerCase</name>
  161.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  162.     <function-signature>java.lang.String toLowerCase(java.lang.String)</function-signature>
  163.     <example>
  164.       Product name: ${fn.toLowerCase(product.name)}
  165.     </example>
  166.   </function>
  167.   <function>
  168.     <description>
  169.       Converts all of the characters of a string to upper case.
  170.     </description>
  171.     <name>toUpperCase</name>
  172.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  173.     <function-signature>java.lang.String toUpperCase(java.lang.String)</function-signature>
  174.     <example>
  175.       Product name: ${fn.UpperCase(product.name)}
  176.     </example>
  177.   </function>
  178.   <function>
  179.     <description>
  180.       Removes white spaces from both ends of a string.
  181.     </description>
  182.     <name>trim</name>
  183.     <function-class>org.apache.taglibs.standard.functions.Functions</function-class>
  184.     <function-signature>java.lang.String trim(java.lang.String)</function-signature>
  185.     <example>
  186.       Name: ${fn.trim(name)}
  187.     </example>  
  188.   </function>
  189. </taglib>