[mapserver-commits] r9818 - branches/branch-5-6/docs/en/mapfile

svn at osgeo.org svn at osgeo.org
Sat Feb 20 15:14:21 EST 2010


Author: sdlime
Date: 2010-02-20 15:14:21 -0500 (Sat, 20 Feb 2010)
New Revision: 9818

Modified:
   branches/branch-5-6/docs/en/mapfile/template.txt
Log:
Added docs for the item tag. (#1636)

Modified: branches/branch-5-6/docs/en/mapfile/template.txt
===================================================================
--- branches/branch-5-6/docs/en/mapfile/template.txt	2010-02-20 19:35:53 UTC (rev 9817)
+++ branches/branch-5-6/docs/en/mapfile/template.txt	2010-02-20 20:14:21 UTC (rev 9818)
@@ -572,11 +572,60 @@
 [tileindex]
      Index value of the current tile. If no tiles used for the current shape 
      this is replaced by \"-1\". Available only when processing query results. 
+
+[item formatting options]
+     An attribute table "item", with list formatting options. The "name" attribute
+     is required.
+
+     Available only when processing query results.
+
+     Available attributes:
+
+     - name =
+             The name of an attribute, case insenstive. (required)
+
+     - precision =
+             The number of decimal places to use for numeric data. Use of this will
+             force display as a number and will lead to unpredicable results with 
+             non-numeric data.
+
+     - pattern =
+             Regular expression to compare the value of an item against. The tag is
+             output only if there is a match.
+
+     - uc =
+             Set this attribute to "true" to convert the attribute value to upper case.
+
+     - lc =
+             Set this attribute to "true" to convert the attribute value to lower case.
+
+     - commify =
+             Set this attribute to "true" to add commas to a numeric value. Again, only
+             useful with numeric data.
+
+     - escape = 
+             Default escaping is for HTML, but you can escape for inclusion in a URL (=url), or
+             not escape at all (=none).
+
+     - format =
+             A format string used to output the attribute value. The token "$value" is
+             used to place the value in a more complex presentation. Default is to 
+             output only the value.
+
+     - nullformat =
+             String to output if the attribute value is NULL, empty or doesn't match
+             the pattern (if defined). If not set and any of these conditions occur
+             the item tag is replaced with an empty string. 
+
+     As a simple example:
+     ::
+
+        [item name="area" precision="2" commify="2" format="Area is $value"]
      
-[DBASE item name],[DBASE item name_esc],[DBASE item name_raw]
-     Item name from the attribute table of a queried layer. Only attributes for the 
+[attribute name],[attrribute name_esc],[attribute item name_raw]
+     Attribute name from the data table of a queried layer. Only attributes for the 
      active query layers are accessible. Case must be the same as what is stored 
-     in the DBASE file. ArcView, for example, uses all caps for shapefile field 
+     in the data file. ArcView, for example, uses all caps for shapefile field 
      names. Available only when processing query results.
 
      By default the attributes are encoded especially for HTML representation. 



More information about the mapserver-commits mailing list