AstunTechnology / iso19139.gemini23

Gemini 2.3 schema plugin for Geonetwork
0 stars 7 forks source link

3.8.x: IMPORTANT Conformity degree displays as text box rather than pass/fail/unknown #38

Closed archaeogeek closed 4 years ago

archaeogeek commented 5 years ago

I've been trying to merge the changes in the 3.4.x branch with 3.8.x but have had a few issues. The remaining one is to do with the conformity degree. My process was:

1) Pull the latest 3.8.xof core-geonetwork and add in the latest 3.8.x branch of iso19139.gemini23. 2) Initialise and build as usual and check everything is running OK using jetty. 3) Merge the 3.4.x branch of iso19139.gemini23, which had one merge conflict in layout-custom-fields.xsl, which I think I resolved correctly. 4) On displaying a Gemini 2.3 record in editing view, I hit errors in functions-metadata.xsl, and it looked to me as if a line had been reverted:

compare https://github.com/geonetwork/core-geonetwork/blob/e802b36a212b8d880c5e5b63e01235890f6fabb5/web/src/main/webapp/xslt/common/functions-metadata.xsl#L355 with https://github.com/geonetwork/core-geonetwork/blob/3.8.x/web/src/main/webapp/xslt/common/functions-metadata.xsl#L359

With the line as it is in line 355 above, the record displays but the conformity degree is incorrect: Screenshot from 2019-09-26 15-39-26

With the line as it is in the latest commit the data quality section does not display at all and I get a run-time error: Screenshot from 2019-09-26 15-41-48 and the following in the logs:

Error on line 359 of functions-metadata.xsl:
  XPTY0004: A sequence of more than one item is not allowed as the first argument of
  normalize-space() ("checkbox", "data-gn-checkbox-with-nilreaso...") 

Is there any chance you could take a look please?

Thanks!

archaeogeek commented 5 years ago

@josegar74 I can confirm that I get the same error when attempting to edit a directory entry for conformity.

josegar74 commented 5 years ago

@archaeogeek I have done these steps:

1) Checkout GeoNetwork 3.4.x branch

2) Merge https://github.com/geonetwork/core-geonetwork/pull/4039

3) Add GEMINI 2.3 (branch conformity)


I can edit the records and look fine:

conformity-edit-metadata


As a side note, I checked initially GEMINI 3.4.x branch and got some issues with the report, see these elements are not fine: https://github.com/AstunTechnology/iso19139.gemini23/blob/bbc6d2ff92c2b2c2428a06c6d1ce94e9b40d720a/src/main/plugin/iso19139.gemini23/templates/template_dataset_gemini23.xml#L360-L362

But with conformity branch was ok.

Please double check the steps at your end.

archaeogeek commented 5 years ago

@josegar74 was this with 3.4.x or 3.8.x? My problem here was with the conformity element in Geonetwork 3.8.x

archaeogeek commented 5 years ago

@josegar74 I've confirmed this with the latest core geonetwork 3.8.x and the gemini 2.3 3.8.x branch with the latest changes merged from 3.4.x. This one's pretty urgent- could you take a look for me?

josegar74 commented 5 years ago

@archaeogeek checking it, the tests I did was with branch 3.4.x, was not aware of the 3.8.x branch of the schema.

josegar74 commented 5 years ago

@archaeogeek I think you miss to merge this PR https://github.com/geonetwork/core-geonetwork/pull/3569

I backported to 3.4.x branch (https://github.com/geonetwork/core-geonetwork/pull/4039), but it's not backported to 3.8.x branch. Checking to provide a PR or patch for this to work in 3.8.x

josegar74 commented 5 years ago

@archaeogeek please do the following steps for 3.8.x:

git clone https://github.com/geonetwork/core-geonetwork
cd core-geonetwork
git checkout 3.8.x
git submodule update --init
git pull https://github.com/josegar74/core-geonetwork.git improvements/inspire-conformity-directive-simple-view-38x
./add-schema.sh iso19139.gemini23 https://github.com/AstunTechnology/iso19139.gemini23 3.8.x

Edit schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/layout/layout.xsl (this is required as it's defined as a submodule and can't be in the PR, should be done a separate PR for this project, but for now ...) and change line 349 to:

 <xsl:copy-of select="gn-fn-metadata:getFieldDirective($editorConfig, name(), name(theElement), $xpath)"/>

conformity-selection-38x

archaeogeek commented 5 years ago

@josegar74 OK I think I've got this working but I had another issue when I tried to validate a record- see https://github.com/AstunTechnology/iso19139.gemini23/issues/40

archaeogeek commented 4 years ago

Closing this as it's now displaying correctly but https://github.com/AstunTechnology/iso19139.gemini23/issues/40 still needs resolving