<div>Hi Alan,</div>
<div> </div>
<div>I found one small bug: the default value of expressionType complex type is 'CONSTANT'. However, the stylesheet will only quote if the value of the attribute is equal to 'CONSTANT', which is not if you don't supply a value for this attribute. All other cases seem to work fine. That is, <expression>583</expression> will not be quoted with the current stylesheet.</div>
<div> </div>
<div>Thanks!<br><br></div>
<div class="gmail_quote">On Mon, Mar 22, 2010 at 12:04 PM, Alan Boudreault <span dir="ltr"><<a href="mailto:aboudreault@mapgears.com">aboudreault@mapgears.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Alexandre, could you test the new xsl file and see if your two issues have<br>been fixed. You can get it via:<br>
<a href="http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile/mapfile.xsl?format=raw" target="_blank">http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile/mapfile.xsl?format=raw</a><br><br>I did a quick fix to integrate it in MS 5.6.3, which is supposed to be<br>
released today.<br><br>expression/filter examples:<br><expression type="CONSTANT">583</expression> or <expression>583</expression><br>will be quoted.<br><expression type="REGEX">/.../</expression> and<br>
<expression type="MSEXPR">(...)</expression> will not be quoted.<br><br>symbol examples:<br><symbol type="NAME">star.gif</symbol> will be quoted<br><symbol type="ID">32</symbol> will not be quoted<br>
<br>Thanks,<br><font color="#888888">Alan<br></font>
<div>
<div></div>
<div class="h5"><br>On March 19, 2010 02:59:17 pm Alexandre Soares wrote:<br>> The symbol attribute (which does not get quoted by default) causes a<br>> problem if the value references a stmbol's name. I think it could also<br>
> benefit from your fix.<br>><br>> Thank you!<br>> On Fri, Mar 19, 2010 at 2:49 PM, Alan Boudreault<br>><br>> <<a href="mailto:aboudreault@mapgears.com">aboudreault@mapgears.com</a>>wrote:<br>> > Alexandre, you are right, if the expression is an regular expression, it<br>
> > shouldn't be quoted. I think the only solution would be to add an<br>> > attribute in<br>> > the xml schema, that will specify if the expression is an regular<br>> > expression<br>> > of not. Something like:<br>
> ><br>> > <expression regex="ON"></expression><br>> ><br>> > In this case, the xsl transformation would not quote it. I take a note on<br>> > that<br>> > and should fix this in the next few days.<br>
> ><br>> > Thanks for reporting!<br>> > Alan<br>> ><br>> > On March 19, 2010 02:21:45 pm Alexandre Soares wrote:<br>> > > Hi,<br>> > ><br>> > > When I transform my xml map file to a map file, my expressions that<br>
> ><br>> > contain<br>> ><br>> > > a regular expression (the same is true for filters) are rendered with<br>> > > double quotes (because the stylesheet has the quote="1" param for<br>
> > > those templates).<br>> > ><br>> > > Is there an intended way to achieve this? I know I could modify the<br>> > > stylesheet to not quote those elements and then quote-wrap my value if<br>
> > > I need them (in case of string comparison).<br>> > ><br>> > > Thank you!<br>> ><br>> > --<br>> > Alan Boudreault<br>> > Mapgears<br>> > <a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com</a><br>
><br><br></div></div>--<br>
<div>
<div></div>
<div class="h5">Alan Boudreault<br>Mapgears<br><a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com</a><br></div></div></blockquote></div><br>