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

        <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"/>

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


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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