-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch edit / Improvements #6239
Conversation
Inserting a snippet eg. mrd:distributor in a non existing section mdb:distributionInfo/mrd:MD_Distribution/mrd:distributor a self closing mrd:distributor was created in addition to the inserted ones. Add some more tests inserting in parent, in non existing element, in element at position.
Related to #6235 and titellus#9.
@@ -318,13 +318,6 @@ | |||
</xsl:copy> | |||
</xsl:template> | |||
|
|||
|
|||
<!-- The topic category directive may create empty topic. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this template removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it was probably added as a workaround to the fact that "Inserting a snippet in an element which does not exist could create an additional self closing tag". The directive for topics category is using the XPath insert API and is this case.
@@ -248,14 +248,6 @@ | |||
</xsl:copy> | |||
</xsl:template> | |||
|
|||
<!-- ================================================================= --> | |||
|
|||
<xsl:template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as the previous one.
@@ -85,7 +86,7 @@ public void getUsers() throws Exception { | |||
.session(this.mockHttpSession) | |||
.accept(MediaType.parseMediaType("application/json"))) | |||
.andExpect(status().isOk()) | |||
.andExpect(jsonPath("$", hasSize(5))) | |||
.andExpect(jsonPath("$", hasSize(6))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this change is related to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but the test was failing (because of https://github.com/geonetwork/core-geonetwork/blob/main/web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql#L729)
Add examples selector
To facilitate usage of the XPath batch editing and examples that can be easily picked up
In batch editor
![image](https://user-images.githubusercontent.com/1701393/162457014-bc98b225-f179-4dd1-9cdb-0f8c44eb3356.png)
In CSW harvester config
![image](https://user-images.githubusercontent.com/1701393/162457040-e884891d-bee4-435d-8176-4ef427d90cfa.png)
Thanks @vbombaerts for the ISO19115-3 examples.
Add copy/paste xpath config
Editing fix
Inserting a snippet in an element which does not exist could create an additional self closing tag
on a record with no distribution section will return
A workaround was define in update-fixed-info for topicCategory when using the standard editor.
Other changes