[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1238: generated schematron scontain attributes without name yielding errors in the validator

#1238: generated schematron scontain attributes without name yielding errors in
the validator
---------------------+------------------------------------------------------
Reporter: landry | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0
Keywords: |
---------------------+------------------------------------------------------
Symptoms are WARNING: schematron xslt
/data/webapps/geonetwork/2.8.0/dev/config/schema_plugins/iso19139
/schematron-rules-geonetwork.xsl failed (and the same on schematron-rules-
iso.xsl).

This yields error in catalina.out in
org.fao.geonet.kernel.DataManager.getSchemaTronXmlReport(DataManager.java:876)

{{{
Error at xsl:attribute on line 384 column 16 of schematron-rules-iso.xsl:
   XTSE0010: Element must have a "name" attribute
Error at xsl:attribute on line 391 column 16 of schematron-rules-iso.xsl:
   XTSE0010: Element must have a "name" attribute
Error at xsl:attribute on line 394 column 16 of schematron-rules-iso.xsl:
   XTSE0010: Element must have a "name" attribute
}}}

In turn the validation window shows 'Schematron error ocurred, rules could
not be verified: Failed to compile stylesheet. 46 errors detected.' (for
-geonetwork.xsl it's only 2 errors)

Looking at the generated file in schematrons/.build/schematron-rules-
geonetwork.xsl (smaller amount of errors than -iso)

{{{
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:active-pattern>
<xsl:attribute>
<value-of/>
</xsl:attribute>
<xsl:attribute>
<xsl:value-of/>
</xsl:attribute>
}}}

the xsl:attribute tags have no 'name' attribute, thus yielding this
warning.

As i dont really understand how this section comes from
iso_svrl_for_xslt2.xsl ( the process-pattern template ? ) i'll let it to
someone who knows this part to explain it.

Or noone can reproduce that ? Or it's dependent on some version of a
processor at some point ?

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

#1238: generated schematron scontain attributes without name yielding errors in
the validator
---------------------+------------------------------------------------------
Reporter: landry | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0
Keywords: |
---------------------+------------------------------------------------------

Comment(by landry):

Note that if i manually set the attribute name to 'none' and do 'save and
validate' there's no validation error shown to the user, but the following
is shown the datamanager debug log :

{{{
   <geonet:report geonet:rule="schematron-rules-geonetwork">
     <svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd&quot;
xmlns:srv="http://www.isotc211.org/2005/srv&quot;
xmlns:gco="http://www.isotc211.org/2005/gco&quot;
xmlns:schold="http://www.ascc.net/xml/schematron&quot;
xmlns:xs="http://www.w3.org/2001/XMLSchema&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:iso="http://purl.oclc.org/dsdl/schematron&quot;
xmlns:xhtml="http://www.w3.org/1999/xhtml&quot;
xmlns:gml="http://www.opengis.net/gml&quot; title="Schematron validation /
GeoNetwork recommendations" schemaVersion="">
       <!-- ?
                   ?
                   ?
                  -->
       <svrl:ns-prefix-in-attribute-values />
       <svrl:ns-prefix-in-attribute-values />
       <svrl:ns-prefix-in-attribute-values />
       <svrl:ns-prefix-in-attribute-values />
       <svrl:ns-prefix-in-attribute-values />
       <svrl:ns-prefix-in-attribute-values />
       <svrl:active-pattern none="" />
     </svrl:schematron-output>
   </geonet:report>

}}}
The three ? ? ? seem to come from utf-8 chars
{{{
./.build/schematron-rules-geonetwork.xsl: <xsl:value-of
select="$archiveDirParameter"/> Â|
./resources/iso_svrl_for_xslt2.xsl: <axsl:comment><axsl
:value-of select="$archiveDirParameter"/> &#xA0;
}}}

And the rest of the message sounds like if the full following section
wasnt supposed to be here.

{{{
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:ns-prefix-in-attribute-values/>
<svrl:active-pattern>
<xsl:attribute name="none">
<value-of/>
</xsl:attribute>
<xsl:attribute name="none">
<xsl:value-of/>
</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>

}}}

I can comment it out completely, no errors are shown anymore - but i'd
just like to ensure this is a real bug.

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