SLD validation source code

classic Classic list List threaded Threaded
4 messages Options
Faz
Reply | Threaded
Open this post in threaded view
|

SLD validation source code

Faz
Hi all,
I'm willing to add a new attributes to the PointSymbolizer's Graphic, that allow flipping the icons of a point Horizontally and/or vertically.
I've added the following to the Graphic child of the PointSymbolizer:

             <sld:FlipHorizontal>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipHorizontal>
              <sld:FlipVertical>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipVertical>

And sure have made some modification to the Geotools source code.

Now everything is working fine, and the icons get flipped, but there is only one problem remaining, that is in the Geoserver's web admin -> Style Editor, when I click Validate, I got the following error message:
"line 57: cvc-complex-type.2.4.d: Invalid content was found starting with element 'sld:FlipHorizontal'. No child element is expected at this point."

I've made some efforts trying to find the place of code that performs this SLD validation, but with no success.

My question is: could you please point me to the place(s) of code I should modify to make this SLD validator see my new attributes?

Regards,
Fawzy


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: SLD validation source code

jody.garnett
The SLD validation is handled here: SLDValidator but if you dig in you can see the XML parser validates against StyledLayerDescriptor.xsd

Note there are a number of style parsers in GeoTools which one did you modify?
--
Jody Garnett


On Sat, 27 Apr 2019 at 04:36, <[hidden email]> wrote:
Hi all,
I'm willing to add a new attributes to the PointSymbolizer's Graphic, that allow flipping the icons of a point Horizontally and/or vertically.
I've added the following to the Graphic child of the PointSymbolizer:

             <sld:FlipHorizontal>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipHorizontal>
              <sld:FlipVertical>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipVertical>

And sure have made some modification to the Geotools source code.

Now everything is working fine, and the icons get flipped, but there is only one problem remaining, that is in the Geoserver's web admin -> Style Editor, when I click Validate, I got the following error message:
"line 57: cvc-complex-type.2.4.d: Invalid content was found starting with element 'sld:FlipHorizontal'. No child element is expected at this point."

I've made some efforts trying to find the place of code that performs this SLD validation, but with no success.

My question is: could you please point me to the place(s) of code I should modify to make this SLD validator see my new attributes?

Regards,
Fawzy
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Faz
Reply | Threaded
Open this post in threaded view
|

Re: SLD validation source code

Faz
Hi Jody,
Thanks a lot for your help.

I have added my two new elements FlipHorizontal and FlipVertical to the StyledLayerDescriptor.xsd, and now it works :)

Regarding the style parser I modified, I have modified the class org.geotools.styling.SLDParser, in gt-main module.

Thanks again :)
Fawzy


--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
https://tutanota.com


May 2, 2019, 1:31 AM by [hidden email]:
The SLD validation is handled here: SLDValidator but if you dig in you can see the XML parser validates against StyledLayerDescriptor.xsd

Note there are a number of style parsers in GeoTools which one did you modify?
--
Jody Garnett


On Sat, 27 Apr 2019 at 04:36, <[hidden email]> wrote:
Hi all,
I'm willing to add a new attributes to the PointSymbolizer's Graphic, that allow flipping the icons of a point Horizontally and/or vertically.
I've added the following to the Graphic child of the PointSymbolizer:

             <sld:FlipHorizontal>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipHorizontal>
              <sld:FlipVertical>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipVertical>

And sure have made some modification to the Geotools source code.

Now everything is working fine, and the icons get flipped, but there is only one problem remaining, that is in the Geoserver's web admin -> Style Editor, when I click Validate, I got the following error message:
"line 57: cvc-complex-type.2.4.d: Invalid content was found starting with element 'sld:FlipHorizontal'. No child element is expected at this point."

I've made some efforts trying to find the place of code that performs this SLD validation, but with no success.

My question is: could you please point me to the place(s) of code I should modify to make this SLD validator see my new attributes?

Regards,
Fawzy
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html






_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Faz
Reply | Threaded
Open this post in threaded view
|

Re: SLD validation source code

Faz
Jody,
Please note that I am working with GeoTools 19.4.

--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
https://tutanota.com


May 2, 2019, 10:18 AM by [hidden email]:
Hi Jody,
Thanks a lot for your help.

I have added my two new elements FlipHorizontal and FlipVertical to the StyledLayerDescriptor.xsd, and now it works :)

Regarding the style parser I modified, I have modified the class org.geotools.styling.SLDParser, in gt-main module.

Thanks again :)
Fawzy


--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:


May 2, 2019, 1:31 AM by [hidden email]:
The SLD validation is handled here: SLDValidator but if you dig in you can see the XML parser validates against StyledLayerDescriptor.xsd

Note there are a number of style parsers in GeoTools which one did you modify?
--
Jody Garnett


On Sat, 27 Apr 2019 at 04:36, <[hidden email]> wrote:
Hi all,
I'm willing to add a new attributes to the PointSymbolizer's Graphic, that allow flipping the icons of a point Horizontally and/or vertically.
I've added the following to the Graphic child of the PointSymbolizer:

             <sld:FlipHorizontal>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipHorizontal>
              <sld:FlipVertical>
                <ogc:Literal>true</ogc:Literal>
              </sld:FlipVertical>

And sure have made some modification to the Geotools source code.

Now everything is working fine, and the icons get flipped, but there is only one problem remaining, that is in the Geoserver's web admin -> Style Editor, when I click Validate, I got the following error message:
"line 57: cvc-complex-type.2.4.d: Invalid content was found starting with element 'sld:FlipHorizontal'. No child element is expected at this point."

I've made some efforts trying to find the place of code that performs this SLD validation, but with no success.

My question is: could you please point me to the place(s) of code I should modify to make this SLD validator see my new attributes?

Regards,
Fawzy
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html







_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users