<p>+1 <br>
-Perry </p>
<div class="gmail_quote">On Mar 17, 2011 3:59 PM, &quot;Lime, Steve D (DNR)&quot; &lt;<a href="mailto:Steve.Lime@state.mn.us">Steve.Lime@state.mn.us</a>&gt; wrote:<br type="attribution">&gt; This is the method used to validate the URL modification of certain map file properties. So it&#39;s already in place. Actually controlling a value domain for a parameter at the layer level is quite useful. It allows for a common interface from the client-side with, plus that&#39;s how it&#39;s done now albeit with layer-level metadata. Not supporting that would be a regression... Doing the validation at the web level is the new feature...<br>
&gt; <br>&gt; Yes, this does handle the defaults.<br>&gt; <br>&gt; Anyway, the problem I have is that you don&#39;t know which CGI parameters are candidates for substitution so you have to at least consider all of them. You could skip some that are MapServer CGI params, e.g. map or layer, but who wants to maintain that plus there might actually be a need for referencing the map file somehow. I just need to be smarter with deciding to even consider looking at a layer...<br>
&gt; <br>&gt; Steve<br>&gt; ________________________________________<br>&gt; From: <a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a> [<a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a>] On Behalf Of Stephen Woodbridge [<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>]<br>
&gt; Sent: Thursday, March 17, 2011 12:13 PM<br>&gt; To: Lime, Steve D (DNR); mapserver-dev<br>&gt; Subject: Re: [mapserver-dev] Show of hands for ticket 3522<br>&gt; <br>&gt; Steve,<br>&gt; <br>&gt; This only came to me, assume it should also go to the list. and cc&#39;ing<br>
&gt; the list.<br>&gt; <br>&gt; Anyway, if you only have a validation block at the WEB, then there<br>&gt; should be only one check right? If a user has a need for more checks<br>&gt; then it costs them more for the need to do more checking.<br>
&gt; <br>&gt; I&#39;m still stuck on what is the use case for all this complexity?<br>&gt; <br>&gt; The best I can imagine so far is the need for different default values<br>&gt; in different layers if the pattern does not validate. And the simple<br>
&gt; work around for this is to make different parameters for different<br>&gt; needs. It is also cleaner and more logical from an application point of<br>&gt; view.<br>&gt; <br>&gt; Not that I want to break stuff but I think going forward we should have<br>
&gt; a clean simple implementation and if we need to grow it for additional<br>&gt; use cases then fine. Which I said before.<br>&gt; <br>&gt; Are you handling default values also?<br>&gt; <br>&gt; I would just force moving all validation up to a single web validation<br>
&gt; block. If you think this might be too restrictive, you could state that<br>&gt; we plan to do this on the user list and ask if it breaks existing use<br>&gt; cases and what those cases are. But this takes time for responses.<br>
&gt; <br>&gt; My 2 cents,<br>&gt;    -Steve W<br>&gt; <br>&gt; On 3/17/2011 12:18 PM, Lime, Steve D (DNR) wrote:<br>&gt;&gt; I have it working like so:<br>&gt;&gt;<br>&gt;&gt;    - validation block for layer (e.g. &#39;foo&#39; &#39;regex&#39;)<br>
&gt;&gt;    - old-style metadata (e.g. &#39;foo_validation_pattern&#39; &#39;regex&#39;)<br>&gt;&gt;    - validation block for web (same syntax as above)<br>&gt;&gt;<br>&gt;&gt; I&#39;m worried it&#39;s expensive since for each parameter passed in you have to check up to 3 expressions for each layer before you know if it&#39;s cool to do the substitutions. I&#39;ve not committed yet...<br>
&gt;&gt;<br>&gt;&gt; Steve<br>&gt;&gt;<br>&gt;&gt; ________________________________________<br>&gt;&gt; From: <a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a> [<a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a>] On Behalf Of Stephen Woodbridge [<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>]<br>
&gt;&gt; Sent: Wednesday, March 16, 2011 11:50 AM<br>&gt;&gt; To: <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br>&gt;&gt; Subject: Re: [mapserver-dev] Show of hands for ticket 3522<br>
&gt;&gt;<br>&gt;&gt; On 3/16/2011 12:38 PM, Lime, Steve D (DNR) wrote:<br>&gt;&gt;&gt; Hi everyone: Working through tickets and this one&#39;s sitting out there:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;     <a href="http://trac.osgeo.org/mapserver/ticket/3522">http://trac.osgeo.org/mapserver/ticket/3522</a><br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; Basically its about requiring a validation pattern (given as a regex) for any value used for runtime substitution. It&#39;s currently optional. I think it would be a proactive move to keep folks from themselves. Currently we allows subs in:<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; - layer: data, tileindex, connection, filter<br>&gt;&gt;&gt; - class: expression<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; 6.0 is the right time if we wanted to do this.<br>&gt;&gt;<br>&gt;&gt; I&#39;m +1 for 6.0 and I think this should be made simple in that all<br>
&gt;&gt; validation patterns are defined once in the MAP -&gt;  VALIDATION object and<br>&gt;&gt; are applied globally.<br>&gt;&gt;<br>&gt;&gt; If you define %foo% and use it in multiple places, I can&#39;t see what it<br>
&gt;&gt; would mean to validate in one place and not in another.  If people want<br>&gt;&gt; separate validations than they can use separate variables. Maybe if<br>&gt;&gt; someone is getting very tricky and they want it to fail so it defaults<br>
&gt;&gt; to a different value based on having multiple defaults that are location<br>&gt;&gt; specific.<br>&gt;&gt;<br>&gt;&gt; My take is, rationalize it and make it simple and if we need more in the<br>&gt;&gt; future then add new features in the new framework.<br>
&gt;&gt;<br>&gt;&gt; -Steve W<br>&gt;&gt; _______________________________________________<br>&gt;&gt; mapserver-dev mailing list<br>&gt;&gt; <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br>
&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt; <br>&gt; _______________________________________________<br>
&gt; mapserver-dev mailing list<br>&gt; <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br>&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; mapserver-dev mailing list<br>&gt; <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br>&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
</div>