Using this documentation I have made the below SLD file, attempting to use an svg that I obtained from here I have moved the svg into /var/lib/tomcat7/webapps/geoserver/data/styles
but the image will not render when previewing in the geoserver style editor (the return is a grey square). I've gone through this SE post and tried to reverse engineer it and have also used a direct path the result are the same. What am I missing?
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a Named Layer is the basic building block of an SLD document -->
<NamedLayer>
<Name>default_point</Name>
<UserStyle>
<!-- Styles can have names, titles and abstracts -->
<Title>Default Point</Title>
<Abstract>A sample style that draws a point</Abstract>
<!-- FeatureTypeStyles describe how to render different features -->
<!-- A FeatureTypeStyle for rendering points -->
<FeatureTypeStyle>
<Rule>
<Name>rule1</Name>
<Title>platform</Title>
<Abstract>Platform icon</Abstract>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple" xlink:href="26 SUSPENDED-OILSHOW.svg"/>
<Format>image/svg+xml</Format>
</ExternalGraphic>
<Size>20</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
I was able to get it to work with a direct path xlink:href="file:////var/lib/tomcat7/webapps/geoserver/data/styles/26%20SUSPENDED-OILSHOW.svg"
Why will it not work with a relative path?
%20
in the relative path?data_dir/styles
and my url to resource<OnlineResource xlink:href="000D000072F3_0.svg"/>
and it works.