#519 closed defect (fixed)
A valid record gets broken by editing
Reported by: | justinrowles | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | v2.6.5 |
Component: | General | Version: | v2.6.4 |
Keywords: | Cc: |
Description
If the attached record, which is valid xml in iso19139, is uploaded and edited, the system will duplicate one line and break it.
Attachments (2)
Change History (8)
by , 13 years ago
Attachment: | shortBad.xml added |
---|
comment:1 by , 13 years ago
verified in 2.6.4 bug still available upload record, choose edit, choose cancel, choose xml-view -> organisation is doubled -> while opening mainenance in edit mode: XPathException : A sequence of more than one item is not allowed as the first argument of normalize-space() ("Agri-Food and Biosciences Inst...", "Agri-Food and Biosciences Inst...")
comment:2 by , 12 years ago
The shortBad.xml file that is supplied is not a valid iso19139 file. It is however a valid XML file. The problem is related to the update-fixed-info.xsl which is not interpreting the gco:CharacterString properly when supplied as "CharacterString xmlns....".
Temporary quick fix is to turn off the "automatic fixes" in the "system configuration".
By doing "name()!='????'" in the xslt we are assuming that the name is fully qualified with the namespace attached. It seems better to no use special functions and simply use something like "not(self::???)" - this seems to have corrected the problem.
However I'm not an XLST expert so the fix should be tested.
by , 12 years ago
Attachment: | update-fixed-info.xsl.patch added |
---|
Changed the patch so that it works a little better and is in line with the changes from ticket #957
comment:3 by , 12 years ago
A better way is to simply rewrite the xml using the namespace prefix. Otherwise there may be other usage of the "name()" on other elements that will be skipped as well.
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 12 years ago
Just curious Ian, when you say the sample is not a valid iso19139 file, do you mean because it is incomplete?
If so, good-oh, that was deliberate ;-)
If not, in what way is it invalid? (I'm not aware of any requirement in iso19139 that the namespaces be aliased.)
Sample record which is valid but can't be edited.