From: andrew w. <aw...@me...> - 2012-10-18 05:31:44
|
Hi Tim, I have come across the same issue i.e validation complaining about a gmx:MimeFileType underneath a parent gmd:name when its expecting a gco:CharacterString. Could be to do with the way you are running the validation, are you running validation inside: - GN's editor or - are running validation through some other software such as ANZMETlite - or an XML editor such as XML Spy? I find this issue when I used the validator in XML Spy and I set the schemaLocation as xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://www.isotc211.org/2005/gmd/gmd.xsd" then I see an error like yours: Element <gmx:MimeFileType> is not allowed under element <gmd:name>. Reason: The following elements are expected at this location (see below) <gco:CharacterString> <gmd:DS_InitiativeTypeCode> <gmd:MD_CharacterSetCode> ... .... Error location: gmd:MD_Metadata / gmd:distributionInfo / gmd:MD_Distribution / gmd:transferOptions / gmd:MD_DigitalTransferOptions / gmd:onLine / gmd:CI_OnlineResource / gmd:name / gmx:MimeFileType Details cvc-model-group: Element <gmx:MimeFileType> unexpected by type 'gco:CharacterString_PropertyType' of element <gmd:name>. cvc-elt.5.2.1: The element <gmd:name> is not valid with respect to the actual type definition 'gco:CharacterString_PropertyType'. If however you reference the schema location to the local ISO19139 schema.xsd on your system (not web) like this: xsi:schemaLocation="http://www.isotc211.org/2005/gmd file:///C:/ANZMEST_SVN9279/web/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/schema.xsd"> the validation will be fine. So your XML is most likely OK it's just saying its invalid because of the way the schema xsd is referenced. Just to check I did the same as you uploading a local file for download using the recent GN V2.8.0RC1 test version. The XML validates OK using the validator in GN editor i.e the 'Check' button. HTH Andrew ----- Original Message ----- From: "timdavies" <td...@uo...> To: <geo...@li...> Sent: Thursday, October 18, 2012 2:27 PM Subject: [GeoNetwork-users] XML validation error when adding a dataset tothe metadata record > HiHope you can help. I am getting an XML error when I try to attach data to > mymetadata record.The record validates until I try to add the dataset.• I open > ‘Distribution information’• Then ‘Distribution format’ where I add the name > and version• Then ‘transfer options’ • ‘Online resource’• Choose file for > download in ‘protocol’.• I upload a file• It says it uploads successfully; It > puts a URL in the ‘URL’ section. TheURL looks right. > > I save and then check and I get this error in the validation report. > Compliance to metadata standard (XML Schema) (1 errors) > Invalid element. Invalid content was found starting with > element:(gmx:MimeFileType). One of the following elements Text > (gco:CharacterString)is expected.Parent element is Name (gmd:name) > Attached is the error path and the > XML.<http://osgeo-org.1560.n6.nabble.com/file/n5009493/error_path.png> > <http://osgeo-org.1560.n6.nabble.com/file/n5009493/xml.png> > > Any help with this will be really appreciated.Cheers, Tim > > > > > --View this message in context: > http://osgeo-org.1560.n6.nabble.com/XML-validation-error-when-adding-a-dataset-to-the-metadata-record-tp5009493.htmlSent > from the GeoNetwork users mailing list archive at Nabble.com. > ------------------------------------------------------------------------------Everyone > hates slow websites. So do we.Make your web apps faster with > AppDynamicsDownload AppDynamics Lite for free > today:http://p.sf.net/sfu/appdyn_sfd2d_oct_______________________________________________GeoNetwork-users > mailing > lis...@li...https://lists.sourceforge.net/lists/listinfo/geonetwork-usersGeoNetwork > OpenSource is maintained at http://sourceforge.net/projects/geonetwork > |