[Geoserver-users] dinamic symbolizers

Hi

I’m Trying to use this example http://blog.geoserver.org/2008/12/08/dynamic-symbolizers-part-1/

But each time I validate this sld file

<?xml version="1.0"
      encoding="UTF-8"?>

<StyledLayerDescriptor version="1.1.0"
                       xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd&quot;
                       xmlns="http://www.opengis.net/sld&quot;
                       xmlns:xlink="http://www.w3.org/1999/xlink&quot;
                       xmlns:ogc="http://www.opengis.net/ogc&quot;
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
                       xmlns:se="http://www.opengis.net/se&quot;&gt;

  <NamedLayer>
    <se:Name>Capa eMood</se:Name>
    <UserStyle>
      <se:Name>Estilo eMood</se:Name>
      <se:FeatureTypeStyle>
        <se:Rule>
          <se:Name>Regla eMood</se:Name>
          <se:Description>
            <se:Title>Regla para simbolizar eMoods</se:Title>
          </se:Description>
          <se:PointSymbolizer>
            <se:Graphic>
              <se:ExternalGraphic>
                <se:OnlineResource xlink:type="simple"
                                   xlink:href="http://localhost:8080/geoserver/styles/emoods/tn_$\{emood\}\.png&quot;/&gt;
                <se:Format>image/png</se:Format>
              </se:ExternalGraphic>
              <se:Size>10</se:Size>
            </se:Graphic>
          </se:PointSymbolizer>
        </se:Rule>
      </se:FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

I get this error

Parsing failed for href: java.net.URISyntaxException: Illegal character in path at index 47: http://localhost:8080/geoserver/styles/emoods/$\{emood\}\.png

Any idea???

Thanks

Well my idea is to use the style anyway :slight_smile:

The substitution trick we are pulling here is GeoServer specific and may not be strictly valid…

···

Jody Garnett

On Fri, Mar 14, 2014 at 3:16 AM, kintela <roberto.quintela@anonymised.com> wrote:

Hi

I’m Trying to use this example http://blog.geoserver.org/2008/12/08/dynamic-symbolizers-part-1/

But each time I validate this sld file

<?xml version="1.0" encoding="UTF-8"?>

Capa eMood Estilo eMood Regla eMood Regla para simbolizar eMoods image/png 10

I get this error

Parsing failed for href: java.net.URISyntaxException: Illegal character in path at index 47: http://localhost:8080/geoserver/styles/emoods/${emood}.png

Any idea???

Thanks

Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Sat, Mar 15, 2014 at 1:35 PM, Jody Garnett <jody.garnett@anonymised.com>wrote:

Well my idea is to use the style anyway :slight_smile:

The substitution trick we are pulling here is GeoServer specific and may
not be strictly valid...

Indeed it's not a valid URL anymore, it's supposed to become one only when
the variable
gets substituted. So, don't worry about that particular validation message

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------