[Geoserver-devel] style schema duplication (was color blending example not valid)

Kevin has tracked down the duplication for GEOS-6971 (see #1010 ) and patched the geoserver copy of the schema file.

We still have duplication between the following two files:

GeoServer: StyledLayerDescriptor.xsd
GeoTools: StyledLayerDescriptor.xsd

Since both these schemas are embedded in a jar is it possible to access them as a class resource (and avoid the duplication)?

I also note the above files still have differences around the use of international strings.

···


Jody Garnett

I noticed that and tried to pull in the GeoTools version of the schema but ended up with a different validation error for my trouble.

https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/vfny/geoserver/util/SLDValidator.java#L200

Do you have the validator error handy?

···

On 8 April 2015 at 15:35, Kevin Smith <ksmith@anonymised.com> wrote:

I noticed that and tried to pull in the GeoTools version of the schema but ended up with a different validation error for my trouble.

https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/vfny/geoserver/util/SLDValidator.java#L200


Jody Garnett

On Thu, Apr 9, 2015 at 12:28 AM, Jody Garnett <jody.garnett@anonymised.com>
wrote:

Kevin has tracked down the duplication for GEOS-6971
<https://osgeo-org.atlassian.net/browse/GEOS-6971&gt; (see #1010
<https://github.com/geoserver/geoserver/pull/1010&gt; ) and patched the
geoserver copy of the schema file.

We still have duplication between the following two files:

GeoServer: StyledLayerDescriptor.xsd
<https://github.com/geoserver/geoserver/blob/master/src/main/src/main/resources/schemas/sld/StyledLayerDescriptor.xsd&gt;
GeoTools: StyledLayerDescriptor.xsd
<https://raw.githubusercontent.com/geotools/geotools/83e50a7ca63f11227d5840463c105ddf6a44330a/modules/extension/xsd/xsd-sld/src/main/resources/org/geotools/sld/bindings/StyledLayerDescriptor.xsd&gt;

Since both these schemas are embedded in a jar is it possible to access
them as a class resource (and avoid the duplication)?

I guess we could, but you have to consider those schemas in GeoServer pull
double duty:
* Internal validation
* Published for the world to download (useful when the server and its
clients are isolated, e.g., miltary network)

So, doable, but you also have to preserve the second duty (publishing),
which right now is performed by
simply putting those files in a schemas package that automatically gets
published on the net.

Each important schema can be found in resources/schemas/..., e.g.:
https://github.com/geoserver/geoserver/tree/master/src/wms/src/main/resources/schemas/wms
https://github.com/geoserver/geoserver/tree/master/src/wfs/src/main/resources/schemas/wfs
...

This is done by ClasspathPublisher, in gs-ows, we'd need something similar
to extract from the GeoTools
xsds, but something that remaps the current published locations, which
should not change for backwards
compatibility, back into a GeoTools package structure.

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 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

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

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