2

In Geoserver, I try to save a SLD file containing this Rule:

<sld:Rule>
  <sld:PointSymbolizer>
    <sld:Graphic>
      <sld:ExternalGraphic>
        <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="https://my.url.net/services/pictureservice/wmg.pic?reference=jvb&id=1047068"/>
        <sld:Format>image/png</sld:Format>
      </sld:ExternalGraphic>
      <sld:Opacity>0.9</sld:Opacity>
      <sld:Size>14</sld:Size>
    </sld:Graphic>
  </sld:PointSymbolizer>
</sld:Rule>

The vaildator complains like this:

line -1: The reference to entity "id" must end with the ';' delimiter.

The problem seems to be the & in the url, which leads to the validation error. But unfortunatly, in the url i need both parameters, the reference and the id. Is there a way to get around this? I am on Geoserver 2.7.2

1 Answer 1

2

This is an XML file so you must use &amp; instead of & in the URL so that the XML parser isn't confused by the & on it's own.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.