Have a look in the user manual, I think you end up needing to use CDATA
(because XML documents ignore whitespace).
http://docs.geoserver.org/latest/en/user/styling/sld-reference/labeling.html
Jody Garnett
On Wed, Apr 30, 2014 at 2:19 AM, Jonathan Moules <
[email protected]> wrote:
> Hi List,
> I'm wondering about using spaces (" ") in labels.
>
> I'm trying to form a label of two concatenated properties, with the output
> looking like:
>
> *Property1 (Property2)*
>
>> <se:Label>
>> <ogc:Function name="Concatenate">
>> <ogc:PropertyName>NAME</ogc:PropertyName>
>> <ogc:Literal> (</ogc:Literal>
>> <ogc:PropertyName>ELEC_2020</ogc:PropertyName>
>> <ogc:Literal>)</ogc:Literal>
>> </ogc:Function>
>> </se:Label>
>
>
> But the output of that is:
> *Property1(Property2)*
>
> Note the lack of space character before the "(". I tried using " ",
> but that resulted in an exception.
>
> After more testing, I ended up at the extreme end:
>
>> <se:Label>
>> <ogc:Function name="Concatenate">
>> <ogc:PropertyName>NAME</ogc:PropertyName>
>> <ogc:Literal> - - - - - (</ogc:Literal>
>> <ogc:PropertyName>ELEC_2020</ogc:PropertyName>
>> <ogc:Literal>)</ogc:Literal>
>> </ogc:Function>
>> </se:Label>
>
>
> The output of which is:
> *Property1*- - - - - *(Property2)*
> Again, note the lack of space between Property1 and the first non-space
> character.
>
> Is this meant to happen, am I doing something wrong, or is it a bug? I
> know in HTML it will only ever show a single space character unless they're
> declared explicitly with " " irrespective of how many are in the code,
> but this seems to be left-trimming only.
>
> Cheers,
> Jonathan
>
> This transmission is intended for the named addressee(s) only and may
> contain confidential, sensitive or personal information and should be
> handled accordingly. Unless you are the named addressee (or authorised to
> receive it for the addressee) you may not copy or use it, or disclose it to
> anyone else. If you have received this transmission in error please notify
> the sender immediately. All email traffic sent to or from us, including
> without limitation all GCSX traffic, may be subject to recording and/or
> monitoring in accordance with relevant legislation.
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos. Get
> unparalleled scalability from the best Selenium testing platform available.
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users