|
To split up large files in reusable parts xml entities seems to be a probate way to go. So I constructed a style like:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE StyledLayerDescriptor [ <!ENTITY MyEntity SYSTEM "../geoserver_data_dir/styles/entities/MyEntity.xml"> ]> <StyledLayerDescriptor version="1.0.0" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <NamedLayer> <Name>teststyle</Name> <UserStyle>
&MyEntity;
</UserStyle> </NamedLayer> </StyledLayerDescriptor>
I want to use relative entity references to be kind of portable. From the used path ../geoserver_data_dir/styles/entities/ it becomes clear, that GeoServer or GeoTools does not set the base path of my style document but the base path of the java runtime. I consider this a bug. I would prefer the base path to be the one the style document lies in.
If I choose a different GEOSERVER_DATA_DIR then entites are search still from the current running location of GeoServer.
|