[GeoNetwork-devel] [GeoNetwork opensource Developer website] #683: Editing / Ajax mode / add attribute with namespace support

#683: Editing / Ajax mode / add attribute with namespace support
---------------------+------------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: Future release
Component: General | Version:
Keywords: |
---------------------+------------------------------------------------------
When adding an attribute having a namespace using Ajax mode, an exception
is thrown :
{{{
2011-11-29 20:24:57,519 INFO [jeeves.service] - Dispatching :
metadata.elem.add.new
2011-11-29 20:24:57,519 DEBUG [jeeves.service] - -> parameters are :
<request>
   <child>geonet:attribute</child>
   <id>94</id>
   <ref>116</ref>
   <name>xlink:role</name>
   <_dc>1322594697508</_dc>
</request>
2011-11-29 20:24:57,519 ERROR [jeeves.service] - Exception when executing
service
2011-11-29 20:24:57,519 ERROR [jeeves.service] - (C) Exc :
org.jdom.IllegalNameException: The name "xlink:role" is not legal for
JDOM/XML attributes: Attribute names cannot contain colons.
2011-11-29 20:24:57,520 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
   <message>The name "xlink:role" is not legal for JDOM/XML attributes:
Attribute names cannot contain colons.</message>
   <class>IllegalNameException</class>
   <stack>
     <at class="org.jdom.Attribute" file="Attribute.java" line="361"
method="setName" />
     <at class="org.jdom.Attribute" file="Attribute.java" line="228"
method="&lt;init&gt;" />
     <at class="org.jdom.Attribute" file="Attribute.java" line="252"
method="&lt;init&gt;" />
     <at class="org.fao.geonet.services.metadata.AjaxEditUtils"
file="AjaxEditUtils.java" line="314" method="addElementEmbedded" />

}}}

The issue happens when turning on xlink attributes editing for example.

Probably a method similar to applyChangesEmbedded using the
COLON_SEPARATOR should be used.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/683&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.

#683: Editing / Ajax mode / add attribute with namespace support
----------------------+-----------------------------------------------------
  Reporter: fxp | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: Future release
Component: General | Version:
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Changes (by fxp):

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

Comment:

Committed revision 8544.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/683#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.

#683: Editing / Ajax mode / add attribute with namespace support
----------------------+-----------------------------------------------------
  Reporter: fxp | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.7.0
Component: General | Version:
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Changes (by ianwallen):

  * milestone: Future release => v2.7.0

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/683#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.