Opened 12 years ago

Closed 12 years ago

#940 closed defect (wontfix)

ISO 19139 XML - unwanted replacement of codeList URLs - not polite

Reported by: ebleys Owned by: geonetwork-devel@…
Priority: major Milestone: v2.8.0
Component: Metadata standards Version:
Keywords: Cc:

Description

Metadata inserted via admin:insert metadata via copy/past with valid CodeList URLs eg (<gmd:MD_CharacterSetCode codeList="http://adl.brs.gov.au/anrdl/resources/codeList/codeList20120313.xml#MD_CharacterSetCode" codeListValue="utf8">utf8</gmd:MD_CharacterSetCode>) gets replaced. a) not polite, as codeLists are allowed to be extended b) the code provided is valid in both spaces yet validation fails.

Change History (1)

comment:1 by simonp, 12 years ago

Resolution: wontfix
Status: newclosed

Can't see how the codelist will get forced just on copy/paste import (doesn't happen as far as I can see).

But from the rest of the ticket I think you must be editing the record and doing a 'Check' (ie.validate) because the codelists attribute is forced by the update-fixed-info.xsl file for the schema on edit, check/save if you have automatic fixes enabled in the system config (and its on by default).

Edit,Check/Saving does that forcing because it assumes you are using the codelist supplied with the schema for use in the editor. If you want to use a different codelist then you should modify things as follows:

  • convert your codelist from the CT_Codelist format to the GeoNetwork codelist format for localization purposes if using the base iso19139 schema (see WEB-INF/data/config/schema_plugins/iso19139/loc/eng/codelists.xml for example). Or in the case of iso19139.anzlic or iso19139.mcp replace the CT_Codelist file in the schema/resources/Codelists dir with your CT_Codelist file. Or alternatively just add your extra codes to those file(s).
  • place the CT_Codelist file you are using somewhere in the schema dir (usually schema/resources/codelists) and rewrite your codelist url to the local file path of the CT_Codelist file using the oasis catalog for the schema eg. in your case you'd need to map http://adl.brs.gov.au/anrdl/resources/codeList/codeList20120313.xml to wherever you put the codelist file (this is so the codelist validator can find it when it runs)
  • modify update-fixed-info.xsl to write the url of your codelist file into the codelist attribute (ie. replace the standard one) in your case it's obviously going to be http://adl.brs....../...

With regard to b), the codelist validator (a schematron) expects an XML document in CT_Codelist catalog format - if you've followed the steps above you will have that.

I'm closing the ticket with won't fix - reopen if any of the above doesn't work - thanks.

Note: See TracTickets for help on using tickets.