Skip to content

make support sld 1.1 version + rework remove_attributes_element function - #123

Merged
jeanmi151 merged 3 commits into
mainfrom
support_for_sld11
May 29, 2026
Merged

jeanmi151 merged 3 commits into
mainfrom
support_for_sld11

Conversation

@jeanmi151

Copy link
Copy Markdown
Contributor

The entry point of the sld is different depending on it version,
with that code I successfully transfer a 1.1.0 sld file

@jeanmi151
jeanmi151 requested a review from mki-c2c May 28, 2026 13:21

@mki-c2c mki-c2c left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems fine to me, function wise I cannot tell, it has to be tested on the platform integration

Comment thread backend/maelstro/core/copy_manager.py Outdated
style_format = style_info["style"]["format"]
# differentiation of the style version :
# https://docs-archive.geoserver.org/stable/en/user/rest/api/styles.html#styles-post-and-put
if style_info["style"]["languageVersion"]["version"] == "1.1.0":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "languageVersion" always returned in the output json ?

or would it be preferable to use if style_info["style"].get("languageVersion", {}).get("version") ??

@jeanmi151 jeanmi151 May 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is always return as style_info["style"]["format"] but okay i can use your style

Comment thread backend/maelstro/core/copy_manager.py Outdated
# https://docs-archive.geoserver.org/stable/en/user/rest/api/styles.html#styles-post-and-put
if style_info["style"]["languageVersion"]["version"] == "1.1.0":
style_format = "htlm"
header = {"Accept": "application/vnd.ogc.se+xml"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

headers in plural for consistency ?

Suggested change
header = {"Accept": "application/vnd.ogc.se+xml"}
headers = {"Accept": "application/vnd.ogc.se+xml"}

@jeanmi151
jeanmi151 force-pushed the support_for_sld11 branch from f482f93 to 245c76b Compare May 29, 2026 07:57
@jeanmi151

Copy link
Copy Markdown
Contributor Author

Just tested it is working with my last modification

@jeanmi151
jeanmi151 force-pushed the support_for_sld11 branch 2 times, most recently from 7f11ec1 to 1e34ab6 Compare May 29, 2026 09:00
@jeanmi151
jeanmi151 force-pushed the support_for_sld11 branch from 1e34ab6 to 6d0c58f Compare May 29, 2026 09:09
@jeanmi151 jeanmi151 changed the title make support sld 1.1 version make support sld 1.1 version + rework remove_attributes_element function May 29, 2026
@jeanmi151
jeanmi151 merged commit 6294ee3 into main May 29, 2026
3 checks passed
@jeanmi151
jeanmi151 deleted the support_for_sld11 branch May 29, 2026 12:00
jeanmi151 added a commit that referenced this pull request May 29, 2026
…ion (#123)

* make support SLD 1.1 version

* rework remove_attributes_element as it was introducing a bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants