I believe that the root element for metadata should be MD_Metadata and =
reference to the schema should be as follows:
<?xml version=3D"1.0" encoding=3D"UTF-8" ?>
This should resolve your initial problem of not being able to find the =
You should really download the ISO 19139 XML schema and store them on =
local system to speed up the validation and to reduce the bandwidth use. =
do this you will need to create an OASIS XML Catalog file and get your
validation script to call it to find the local copies of the XSDs. Note =
the reference in the schemaLocation *should not change*. It would be =
bad to have to change every single metadata record just to validate it =
local copies of the XSDs.
I don't know what GeoNetwork does but it should do something similar to
prevent bandwidth usage as well as solve problems caused by access =
Any validation should do full-schema checking to fully apply the W3C XML
Schema specification rather than some methods that second rate =
software use. ;--)
I hope that this helps.
> -----Original Message-----
> From: geonetwork-devel-bounces@...=20
> [mailto:geonetwork-devel-bounces@...] On=20
> Behalf Of Martin Kofahl
> Sent: Thursday, 27 July 2006 7:42 PM
> To: Geonetwork-devel@...
> Subject: [Geonetwork-devel] iso19139 validation
> Currently, I try to add an iso19139 dataset via XML Insert Form. It=20
> doensn't work for me, and I don't know why. Sample file is attached.=20
> Further, I replaced all namespaces=20
> to http://www.isotc211.org/2005/ (not sure which one is correct).
> When inserting, error message is "cannot find root element".
> Error occures in org.fao.geonet.kernel.DataManager.extractUUID:
> String uuid =3D Xml.transform(md, styleSheet).getText().trim();
> In jeeves.utils.xml it's transform(Element xml, String=20
> return (Element)resXml.getDocument().getRootElement().detach();
> I _think_ resXml.getDocument() is null (however, resXml.getResult()=20
> looks ok), but I did play with the source quite a while, may be there=20
> are some other errors now. Could someone try to insert this dataset=20
> (attend to namespaces!).
> Thank you!