[Mapserver-users] 3.7 DATAPATTERN
Jan Hartmann
jhart at frw.uva.nl
Thu Feb 27 08:55:35 PST 2003
Oliver,
It seems the regex has to be *without* slashes and *with* quotes, e.g.:
DATAPATTERN "myfile"
will match only myfile
DATAPATTERN "myfile|yourfile"
will match either myfile or yourfile
DATAPATTERN "/home/data/.*"
will match everything below /home/data (note that the slashes are for
directories, not for the regex)
and DATAPATTERN ".*"
will match everything.
BTW: DATAPATTERN "." will match only filenames that are exactly one
character long; DATAPATTERN "/./" will match a file in the root
directory with a name of one character followed by a slash.
As fas as I could see, error messages are output only when a DATAPATTERN
is set and a DATA statement doesn't match it. When no DATAPATTERN is set
and data are requested via the DATA statement, the DATA statement is
ignored and a map is returned based on the original MapFile.
Jan
Oliver Wesp wrote:
> Dear List,
>
> I'm struggling with changin the datasource dynamically via cgi. This
> requires the new DATAPATTERN-Parameter in MS 3.7. I tried different
> settings with the following results:
>
> DATAPATTERN /./ results in
>
> getString(): Symbol definition error. (.):(16)
>
> DATAPATTERN '/./' seems to work but results in
>
> msEvalRegex(): Regular expression error. String (raster/myTIF.tif)
> failed expression test.
>
> DATAPATTERN '.'
>
> results in the generation of a new Map, but still the Data isn't
> displayed. I guess I'm getting something totally wrong. Is anybody able
> to give me an example on the usage of DATAPATTERN.
>
> Tanks in advance
> Oliver
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
Jan Hartmann
Department of Geography
University of Amsterdam
jhart at frw.uva.nl
More information about the MapServer-users
mailing list