[GeoNetwork-devel] [GeoNetwork opensource Developer website] #519: A valid record gets broken by editing

#519: A valid record gets broken by editing
--------------------------+-------------------------------------------------
Reporter: justinrowles | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Keywords: |
--------------------------+-------------------------------------------------
If the attached record, which is valid xml in iso19139, is uploaded and
edited, the system will duplicate one line and break it.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/519&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#519: A valid record gets broken by editing
--------------------------+-------------------------------------------------
Reporter: justinrowles | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Keywords: |
--------------------------+-------------------------------------------------

Comment(by pvgenuchten):

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...")

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/519#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#519: A valid record gets broken by editing
--------------------------+-------------------------------------------------
Reporter: justinrowles | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Keywords: |
--------------------------+-------------------------------------------------

Comment(by ianwallen):

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.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/519#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#519: A valid record gets broken by editing
--------------------------+-------------------------------------------------
Reporter: justinrowles | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Keywords: |
--------------------------+-------------------------------------------------

Comment(by ianwallen):

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.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/519#comment:3&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#519: A valid record gets broken by editing
---------------------------+------------------------------------------------
  Reporter: justinrowles | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Resolution: fixed | Keywords:
---------------------------+------------------------------------------------
Changes (by ianwallen):

  * status: new => closed
  * resolution: => fixed

Comment:

Fixed in commit https://github.com/geonetwork/core-
geonetwork/commit/c490bca5b57f4e7e38c96a466fd88c196c765daf

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/519#comment:4&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#519: A valid record gets broken by editing
---------------------------+------------------------------------------------
  Reporter: justinrowles | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Resolution: fixed | Keywords:
---------------------------+------------------------------------------------

Comment(by justinrowles):

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 :wink:

If not, in what way is it invalid? (I'm not aware of any requirement in
iso19139 that the namespaces be aliased.)

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/519#comment:5&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#519: A valid record gets broken by editing
---------------------------+------------------------------------------------
  Reporter: justinrowles | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Resolution: fixed | Keywords:
---------------------------+------------------------------------------------

Comment(by ianwallen):

Yes, that is what I meant - it was incomplete.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/519#comment:6&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.