[mapserver-commits] r9819 - trunk/docs/en/mapfile
svn at osgeo.org
svn at osgeo.org
Sat Feb 20 15:18:23 EST 2010
Author: sdlime
Date: 2010-02-20 15:18:22 -0500 (Sat, 20 Feb 2010)
New Revision: 9819
Modified:
trunk/docs/en/mapfile/template.txt
Log:
Added docs for the item tag. (#1636)
Modified: trunk/docs/en/mapfile/template.txt
===================================================================
--- trunk/docs/en/mapfile/template.txt 2010-02-20 20:14:21 UTC (rev 9818)
+++ trunk/docs/en/mapfile/template.txt 2010-02-20 20:18:22 UTC (rev 9819)
@@ -573,17 +573,66 @@
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.
-[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
+[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"]
+
+[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.
In addition the escaped version (for use in URLs) as well as the raw data is
available.
-[Join name_DBASE item name],[Join name_DBASE item name_esc], [Join name_DBASE item name_raw]
+[Join name_attribute name],[Join name_attribute name_esc], [Join name_attribute name_raw]
One-to-one joins: First the join name (as specified in the :ref:`mapfile` has to
be given, second the tables fields can be accessed similar to the layers
attribute data. Available only when processing query results.
More information about the mapserver-commits
mailing list