[GeoNetwork-devel] Making elements in iso19139 / identification.xsd required (display red border in GUI)

Hi

We are creating a slightly stricter version of ISO19139. The changes is almost exclusively to make some elements required.

When elements is required, they normally appear with the red box around the user input, except for the 3 attributes changed in the example below. (individualName, organisationName & positionName) I simply cant find a reason why ( & more importantly, where) they are treaded differently. They just keep on appearing as standard elements without the red required border when rendering them inside a template in mode ‘’

Thanks in advance!

Template:
<xsl:apply-templates mode=“elementEP” select=“gmd:individualName|geonet:child[string(@name)=‘individualName’]”>
<xsl:with-param name=“schema” select=“$schema”/>
<xsl:with-param name=“edit” select=“$edit”/>
</xsl:apply-templates>

XSD:
<xs:complexType name=“CI_ResponsibleParty_Type”>
xs:annotation
xs:documentationIdentification of, and means of communication with, person(s) and organisations associated with the dataset</xs:documentation>
</xs:annotation>
xs:complexContent
<xs:extension base=“gco:AbstractObject_Type”>
xs:sequence

<xs:element name=“individualName” type=“gco:CharacterString_PropertyType” minOccurs=“1” maxOccurs=“1”/>
<xs:element name=“organisationName” type=“gco:CharacterString_PropertyType” minOccurs=“1” maxOccurs=“1”/>
<xs:element name=“positionName” type=“gco:CharacterString_PropertyType” minOccurs=“1” maxOccurs=“1”/>
<xs:element name=“contactInfo” type=“gmd:CI_Contact_PropertyType” minOccurs=“0”/>
<xs:element name=“role” type=“gmd:CI_RoleCode_PropertyType” minOccurs=“1” maxOccurs=“1”/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

Hi,

···

2014-02-14 11:29 GMT+01:00 Gert Conradie <gert.conradie@anonymised.com.31…>:

Hi

We are creating a slightly stricter version of ISO19139. The changes is almost exclusively to make some elements required.

When elements is required, they normally appear with the red box around the user input, except for the 3

Mandatory element in the XSD are styled using bold label and 2px border due to the “mandatory” class added to those elements. See https://github.com/geonetwork/core-geonetwork/blob/develop/web-client/src/main/resources/apps/css/gnmetadatadefault.css#L30
https://github.com/geonetwork/core-geonetwork/blob/develop/web-client/src/main/resources/apps/css/gnmetadatadefault.css#L51

The red border highlight errors like invalid number in numeric field or invalid email in email field.

HTH.

Francois

attributes changed in the example below. (individualName, organisationName & positionName) I simply cant find a reason why ( & more importantly, where) they are treaded differently. They just keep on appearing as standard elements without the red required border when rendering them inside a template in mode ‘’

Thanks in advance!

Template:
<xsl:apply-templates mode=“elementEP” select=“gmd:individualName|geonet:child[string(@name)=‘individualName’]”>
<xsl:with-param name=“schema” select=“$schema”/>
<xsl:with-param name=“edit” select=“$edit”/>
</xsl:apply-templates>

XSD:
<xs:complexType name=“CI_ResponsibleParty_Type”>
xs:annotation
xs:documentationIdentification of, and means of communication with, person(s) and organisations associated with the dataset</xs:documentation>
</xs:annotation>
xs:complexContent
<xs:extension base=“gco:AbstractObject_Type”>
xs:sequence

<xs:element name=“individualName” type=“gco:CharacterString_PropertyType” minOccurs=“1” maxOccurs=“1”/>
<xs:element name=“organisationName” type=“gco:CharacterString_PropertyType” minOccurs=“1” maxOccurs=“1”/>
<xs:element name=“positionName” type=“gco:CharacterString_PropertyType” minOccurs=“1” maxOccurs=“1”/>
<xs:element name=“contactInfo” type=“gmd:CI_Contact_PropertyType” minOccurs=“0”/>
<xs:element name=“role” type=“gmd:CI_RoleCode_PropertyType” minOccurs=“1” maxOccurs=“1”/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>


Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork