fix skipping of empty text nodes in rapidxml parser (matches libxml2) - closes #2253
This commit is contained in:
parent
6ef7b21107
commit
6610fcc297
2 changed files with 19 additions and 1 deletions
|
@ -141,7 +141,10 @@ private:
|
||||||
case rapidxml::node_data:
|
case rapidxml::node_data:
|
||||||
case rapidxml::node_cdata:
|
case rapidxml::node_cdata:
|
||||||
{
|
{
|
||||||
node.add_child(cur_node->value(), 0, true);
|
if (cur_node->value_size() > 0) // Don't add empty text nodes
|
||||||
|
{
|
||||||
|
node.add_child(cur_node->value(), 0, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
15
tests/data/good_maps/empty_text_symbolizer.xml
Normal file
15
tests/data/good_maps/empty_text_symbolizer.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
|
||||||
|
|
||||||
|
<Style name="labels">
|
||||||
|
<Rule>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book"></TextSymbolizer>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book">''</TextSymbolizer>
|
||||||
|
<TextSymbolizer face-name="DejaVu Sans Book"><![CDATA[]]></TextSymbolizer>
|
||||||
|
</Rule>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Layer name="point" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
|
||||||
|
<StyleName>labels</StyleName>
|
||||||
|
</Layer>
|
||||||
|
|
||||||
|
</Map>
|
Loading…
Reference in a new issue