[Geoserver-users] SLD TextSymbolizer sub-elements, in order?

hey all,

is it just me or does anyone else wish the SLD validator in GeoServer didn't
care about the order of sibling elements in SLD files?

for example, within a TextSymbolizer you might have any of the following:
LabelPlacement, Halo, Font, Fill, etc. And I am only able to get GeoServer
to validate them by randomly guessing which order they should be in. Try
putting Halo before LabelPlacement, then try putting it after, and see which
works. I imagine this is specified in some standards document or WSDL file
or something, but we all know that is like pulling teeth, and I haven't seen
it any of the GeoServer documentation anywhere.

is there something obvious I'm missing? I guess the XML editors discussed
in a different thread might help enforce the right order since they are all
prim and proper and know how to read a WSDL file, but I'm often just editing
SLD files remotely on the server so...

thanks,
mike
--
View this message in context: http://www.nabble.com/SLD-TextSymbolizer-sub-elements%2C-in-order--tf4749188.html#a13580104
Sent from the GeoServer - User mailing list archive at Nabble.com.

mfrumin ha scritto:

hey all,

is it just me or does anyone else wish the SLD validator in GeoServer didn't
care about the order of sibling elements in SLD files?

for example, within a TextSymbolizer you might have any of the following:
LabelPlacement, Halo, Font, Fill, etc. And I am only able to get GeoServer
to validate them by randomly guessing which order they should be in. Try
putting Halo before LabelPlacement, then try putting it after, and see which
works. I imagine this is specified in some standards document or WSDL file
or something, but we all know that is like pulling teeth, and I haven't seen
it any of the GeoServer documentation anywhere.

is there something obvious I'm missing? I guess the XML editors discussed
in a different thread might help enforce the right order since they are all
prim and proper and know how to read a WSDL file, but I'm often just editing
SLD files remotely on the server so...

SLD is defined by a XML schema where the element order is, unfortunately, mandated. We do not validate the document by hand, an xml
validator does it, so we either validate the document against the schema (order included) or we don't (xml wizards around, feel free to prove me
wrong :slight_smile: ).
So I guess the solution is either to go on with the above suggested
xml editor thing, or provide an UI for SLD editing that does the xml writing.
The latter is hard and the SOC project associated to it just provided
a proof of concept that we cannot include in GeoServer as is, the former
should allow you to work on a remote server anyways, since you can just
pick the sld, copy into the local editor, edit and the copy back into
the form. It seems I really have to go forward with that stripped
down Eclipse idea...

Cheers
Andrea