[Geoserver-users] Labelling with white spaces

Hi to all,

Labelling streets and roads with GeoServer (SLD) I am having difficulties to introduce a white space between two “Property_Name” elements in a label, that is, a concatenation like this:

(…)

ogc:PropertyNameTIP_VIA</ogc:PropertyName>

-----I would like to introduce a white space here, between the street type and its name---------------------------

ogc:PropertyNameNOM_VIA</ogc:PropertyName>

(…)

I have found a post from André Aime about this issue (http://n2.nabble.com/SLD-labels,-whitespace,-and-mixed-content-td1957658.html), but I don’t know if there is already an easier solution or it is necessary to modify the xml schema. In this case, I would like to know exactly in which schema I should introduce the change and if the sentence I should introduce is only “xs:whitespace=preserve”, what I have read in the post.

Thank you very much,

José Miguel


José Miguel Rubio Iglesias

Subdirección General de Aplicaciones Geográficas

Instituto Geográfico Nacional

C/General Ibáñez de Ibero, 3 28003 MADRID

Despacho: A 0002 Teléfono: 91 597 97 51

E-mail: jmrubio@anonymised.com

Rubio Iglesias José Miguel ha scritto:

Hi to all,

Labelling streets and roads with GeoServer (SLD) I am having difficulties to introduce a white space between two “Property_Name” elements in a label, that is, a concatenation like this:

(…)

/ <Label>/

/ <ogc:PropertyName>TIP_VIA</ogc:PropertyName>/

-----I would like to introduce a white space here, between the street type and its name---------------------------

/ <ogc:PropertyName>NOM_VIA</ogc:PropertyName>/

/ </Label>/

(…)

I have found a post from André Aime about this issue (http://n2.nabble.com/SLD-labels,-whitespace,-and-mixed-content-td1957658.html), but I don’t know if there is already an easier solution or it is necessary to modify the xml schema.

> In this case, I would like to know

exactly in which schema I should introduce the change and if the sentence I should introduce is only “xs:whitespace=preserve”, what I have read in the post.

In order to introduce a single space no schema modification should
be necessary, but there is a bug in parsing that's eliminating
also the single spaces:
http://jira.codehaus.org/browse/GEOS-1620

As for inserting multiple ones Gabriel has made a patch that allows
one for force in spaces and newlines at will when using CDATA sections,
but it hasn't been integrated so far.

I'll look into fixing both of these by 1.7.3
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.