#2611 closed defect (fixed)
SLD TextSymbolizer can't deal with xmlns on PropertyName node
Reported by: | bartvde | Owned by: | tomkralidis |
---|---|---|---|
Priority: | normal | Milestone: | 5.2 release |
Component: | WMS Server | Version: | 5.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
When using:
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><NamedLayer><Name>AAA64</Name><UserStyle><FeatureTypeStyle><Rule><Name>default</Name><TextSymbolizer><Label><ogc:PropertyName xmlns:ogc="http://www.opengis.net/ogc">ROUTE</ogc:PropertyName></Label></TextSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>
Mapserver comes back with an error saying that a specified FILTERITEM, CLASSITEM or expression key can't be found.
Leaving out the xmlns:ogc part on the node fixes the problem, but the first case should also be dealt with.
Attachments (1)
Change History (9)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Milestone: | → 5.2 release |
---|
comment:3 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Bart: thanks for the patch. Perhaps we should scan the code in general to make sure that this is not happenning elsewhere (i.e. fetching the attribute instead of the content value)? Maybe we should apply to 5-0 branch as well?
comment:4 by , 16 years ago
Working on this. Only occurs in the above code block (Bart: I think your patch may be a bit dated, this code is at line 2518 in trunk).
Bart: can you post a small testcase? I'd like to verify that the fix works against a def without the xmlns:ogc attribute as well. I'll try to cobble one together unless you can post something before that.
comment:5 by , 16 years ago
Hi Tom, my patch was against 5.0.2.
With test case you mean: shapefile, MAP file plus a request?
It can be any shapefile and MAP file, and the request above can easily be changed to match a layer name and column available in your dataset (and to leave out/include the xmlns:ogc bit on PropertyName).
If you still need a testcase, please tell me and I'll prepare one.
comment:6 by , 16 years ago
comment:7 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Tom, looks good, marking as FIXED.
comment:8 by , 16 years ago
Scanning the code, there are other few places where the CPLGetXMLValue should be used instead of psChild->pszValue for the same reasons as discussed in this bug. I will do the clean up on those and run the autotest to verify.
Okay, a bit of debugging info: