[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1032: update-fxed-info.xsl fro mcp schemas (1.4 an 1.5-expermental) adds faulty xsi:schemaLocation

#1032: update-fxed-info.xsl fro mcp schemas (1.4 an 1.5-expermental) adds faulty
xsi:schemaLocation
--------------------------------+-------------------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0 RC0
Component: Metadata standards | Version: v2.8.0RC0
Keywords: MCP schema |
--------------------------------+-------------------------------------------
Using Latest GN2.8+ANZMEST update-fixed-info.xsl runs whenever
you do an edit/save/close. update-fixed-info.xsl updates the
xsi:SchemaLocation in the root element or adds one if missing.

The problem is that the xsi:SchemaLocation is faulty and fails
schema URL lookup when opening with an XML editor such as XML spy.

(This issue appears to have been introduced back with the BlueNet
V1.4.2 of Geonetwork and has been copied across with the introduction of
the mcp schema plugins to the V2.8 GN)

This is the xsi:SchemaLocation added for mcp 1.4 schema:

xsi:schemaLocation="
				http://www.isotc211.org/2005/gmd
http://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
http://bluenet3.antcrc.utas.edu.au/mcp
http://bluenet3.antcrc.utas.edu.au/mcp-1.4/schema.xsd
&\#x9;&\#x9;&\#x9;"

2 problems are evident:

1. The start and end of the schemaLocation contains html encoded newline
and TAB characters these cause schema URL
lookup to fail.

2. The schemaLocation references gmd.xsd, then srv.xsd and then
mcp-1.4 schema.xsd. This causes an 'already referenced element' schema
lookup error because the mcp schema also contains gmd and srv
schema. To fix this issue refer to the mcp-1.4 schema only.

For the mcp-1.5-experimental schema the schema Location added
is:

xsi:schemaLocation="http://www.isotc211.org/2005/gmd
http://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
http://bluenet3.antcrc.utas.edu.au/mcp
http://bluenet3.antcrc.utas.edu.au/mcp-1.5-experimental/schema.xsd"

The mcp-1.5 doesn't have the newline/tab issue but still the
'already referenced element' issue.

The is the suggested fix to the mcp-1.4 update-fixed-info.xsl

Replace lines 32-34 (note embedded newline+tab problem within
XML element contents):

                         <xsl:attribute name="xsi:schemaLocation">
                                 http://www.isotc211.org/2005/gmd
http://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
http://bluenet3.antcrc.utas.edu.au/mcp
http://bluenet3.antcrc.utas.edu.au/mcp-1.4/schema.xsd
                         </xsl:attribute>

with <xsl:attribute
name="xsi:schemaLocation">http://bluenet3.antcrc.utas.edu.au/mcp
http://bluenet3.antcrc.utas.edu.au/mcp-1.4/schema.xsd&lt;/xsl:attribute&gt;

Note: the text within the <xsl:attribute> is a single string with no line
breaks

The is the suggested fix to the mcp-1.5-experimental update-fixed-
info.xsl:

Replace line 32:

                         <xsl:attribute
name="xsi:schemaLocation">http://www.isotc211.org/2005/gmd
http://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
http://bluenet3.antcrc.utas.edu.au/mcp
http://bluenet3.antcrc.utas.edu.au/mcp-1.5-experimental/schema.xsd&lt;/xsl:attribute&gt;

with:

<xsl:attribute
name="xsi:schemaLocation">http://bluenet3.antcrc.utas.edu.au/mcp
http://bluenet3.antcrc.utas.edu.au/mcp-1.5-experimental/schema.xsd&lt;/xsl:attribute&gt;

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

#1032: update-fixed-info.xsl for mcp schemas (1.4 an 1.5-expermental) adds faulty
xsi:schemaLocation
--------------------------------+-------------------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0 RC0
Component: Metadata standards | Version: v2.8.0RC0
Keywords: MCP schema |
--------------------------------+-------------------------------------------

Comment(by awalsh):

Fix typo. in title.

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

#1032: update-fixed-info.xsl for mcp schemas (1.4 an 1.5-expermental) adds faulty
xsi:schemaLocation
--------------------------------+-------------------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0 RC0
Component: Metadata standards | Version: v2.8.0RC0
Keywords: MCP schema |
--------------------------------+-------------------------------------------

Comment(by awalsh):

I have now tested the suggested fixes and they work OK. I run
edit/save/close
on some existing mcp1.4 and mcp-1.5-experimental records. The revised
xsi:schemaLocations added validate the XML correctly when using an
external
XML editor such as XML Spy.

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

#1032: update-fixed-info.xsl for mcp schemas (1.4 an 1.5-expermental) adds faulty
xsi:schemaLocation
---------------------------------+------------------------------------------
  Reporter: awalsh | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.8.0 RC0
Component: Metadata standards | Version: v2.8.0RC0
Resolution: fixed | Keywords: MCP schema
---------------------------------+------------------------------------------
Changes (by simonp):

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

Comment:

Fixed in commit b19fe403275cb1233c085f9a22b7445e81113960

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