we are using geonetwork with a own metadata-schema which is based on an
existing one.
In Geonetwork 2.4 the metadata input-form marks the mandatory fields
with a red box, a nice new feature.
In our own schema some metadata attributes are not mandatory anymore,
but they still appear with a red box in the input-form, and vice versa.
How can we disable / enable the red boxes for obligatory metadata in the
input-form?
If your schema define the cardinality to 1, then the metadocument
contains a geonet:element/@min attribute which is used to set the
validation event. See :
<xsl:if test="../geonet:element/@min='1' and $edit">
<xsl:attribute name="onkeyup">validateNonEmpty(this);</xsl:attribute>
</xsl:if>
in metadata.xsl or metadata-iso19139.xsl.
Then for number validation, specific templates could be made (eg.
gts:TM_PeriodDuration).
Are you using an ISO profil ? For which element the issue occurs ?
I would say it is in the XSD files related to your schema : mandatory fields
are taken from the XSD specifications, I believe.
So you would have to change the specification and set those fields as not
mandatory...
Cheers,
Jean
2009/8/12 Jan Schorn <js@anonymised.com>
Hi all,
we are using geonetwork with a own metadata-schema which is based on an
existing one.
In Geonetwork 2.4 the metadata input-form marks the mandatory fields
with a red box, a nice new feature.
In our own schema some metadata attributes are not mandatory anymore,
but they still appear with a red box in the input-form, and vice versa.
How can we disable / enable the red boxes for obligatory metadata in the
input-form?
Thanks a lot for any advice!
Jan
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
We made a new schema based on the ISO19139 profile.
In the schema.xsd we wrote, for example:
<xsd:element name="language" minOccurs="1" maxOccurs="1" type="xsd:string"/>
it results in Language with a * but without the red border.
So the red * is getting activated and deactivated, but not the red
border around the text field.
We are doing right with switching the fields to mandatory with changing
minOccurs=1 or is there an other parameter we need to change?
Thanks for any hint!
Jan
Jean Pommier (IGE) escribió:
Hi,
I would say it is in the XSD files related to your schema : mandatory
fields are taken from the XSD specifications, I believe.
So you would have to change the specification and set those fields as
not mandatory...
Cheers,
Jean
2009/8/12 Jan Schorn <js@anonymised.com>
Hi all,
we are using geonetwork with a own metadata-schema which is based
on an
existing one.
In Geonetwork 2.4 the metadata input-form marks the mandatory fields
with a red box, a nice new feature.
In our own schema some metadata attributes are not mandatory anymore,
but they still appear with a red box in the input-form, and vice
versa.
How can we disable / enable the red boxes for obligatory metadata
in the
input-form?
Thanks a lot for any advice!
Jan
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports
2008 30-Day
trial. Simplify your report design, integration and deployment -
and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
<mailto:GeoNetwork-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
we resolved the problem with the red box in the input form based on the
hint from Francois, that's the way we did it:
1) In metadata.xsl in the if-condition line +-910 we changed
../geonet:elemento@anonymised.com por geonet:element/@min (without the '/')
2) In line +-849, below this line:
<select class="md" name="_{geonet:element/@ref}" size="1">
we added the following if-condition:
<xsl:if test="geonet:element/@min='1' and $edit">
<xsl:attribute name="onchange">validateNonEmpty(this);</xsl:attribute>
</xsl:if>
3) In the file metadata-ownScheme.xsl below the following line:
<input class="md" type="text" name="_{$ref}" id="_{$ref}_cal"
value="{text()}" size="30">
we added the same if-condition:
<xsl:if test="geonet:element/@min='1' and $edit">
<xsl:attribute name="onkeyup">validateNonEmpty(this);</xsl:attribute>
</xsl:if>
Hope it helps to others struggling with the red boxes in the input-form
like we did
Good luck to all the geonetwork users and developers!
Cheers,
Jan
Francois Prunayre escribió:
Hello Jan,
2009/8/12 Jan Schorn <js@anonymised.com>:
we are using geonetwork with a own metadata-schema which is based on an
existing one.
In Geonetwork 2.4 the metadata input-form marks the mandatory fields
with a red box, a nice new feature.
In our own schema some metadata attributes are not mandatory anymore,
but they still appear with a red box in the input-form, and vice versa.
How can we disable / enable the red boxes for obligatory metadata in the
input-form?
If your schema define the cardinality to 1, then the metadocument
contains a geonet:element/@min attribute which is used to set the
validation event. See :
<xsl:if test="../geonet:element/@min='1' and $edit">
<xsl:attribute name="onkeyup">validateNonEmpty(this);</xsl:attribute>
</xsl:if>
in metadata.xsl or metadata-iso19139.xsl.
Then for number validation, specific templates could be made (eg.
gts:TM_PeriodDuration).
Are you using an ISO profil ? For which element the issue occurs ?
Does the solution for enforcing / removing fields mandatory remain similar
in version 3.X?
I'm creating a custom profile based on iso19139. In some fields I change the
minOccurs property from "0" to "1" in the identification.xsd file and the
"*" does not appear on the form.
The case quoted worked perfectly in the "Status" field, but did not work in
the "keyword" field.
Does the solution for enforcing / removing fields mandatory remain similar
in version 3.X?
I'm creating a custom profile based on iso19139. In some fields I change the
minOccurs property from "0" to "1" in the identification.xsd file and the
"*" does not appear on the form.
The case quoted worked perfectly in the "Status" field, but did not work in
the "keyword" field.
Does the solution for enforcing / removing fields mandatory remain similar
in version 3.X?
I'm creating a custom profile based on iso19139. In some fields I change the
minOccurs property from "0" to "1" in the identification.xsd file and the
"*" does not appear on the form.
The case quoted worked perfectly in the "Status" field, but did not work in
the "keyword" field.