[GeoNetwork-users] TimePeriod "id" attribute?

Hi All,

I'm trying to insert some metadata via the "XML Metadata Insert" page, but the validation seems to be rather confused about the "id" attribute of the "TimePeriod" element. Without it, I get the following error:

  Exception in startElement: cvc-complex-type.4: Attribute 'id' must appear on element 'gml:TimePeriod'.

But when I include one, it then gives the following message:

  Exception in startElement: cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'gml:TimePeriod'.

I'm not sure which it's supposed to be, but can someone shed any light on this apparent conflict?

Best regards,

Andy

If I'm not mistaken, this is a namespacing issue. The attribute must appear, but it's a GML attribute, so must be namespaced with the GML URI: "http://www.opengis.net/gml", not the GMD namespace which is probably the default in your document. Or possibly the other way around-- a GMD attribute that must have the GMD namespace. I've had this problem, but I honestly can't remember which way was right round. {grin} Anyway, you might try explicitly namespacing the attribute.

---
A. Soroka / Digital Research & Scholarship Dep't : Digital Scholarship R&D
the University of Virginia Library

On Apr 11, 2008, at 10:42 AM, Andrew Chamberlain wrote:

Hi All,

I'm trying to insert some metadata via the "XML Metadata Insert" page,
but the validation seems to be rather confused about the "id" attribute
of the "TimePeriod" element. Without it, I get the following error:

  Exception in startElement: cvc-complex-type.4: Attribute 'id' must
appear on element 'gml:TimePeriod'.

But when I include one, it then gives the following message:

  Exception in startElement: cvc-complex-type.3.2.2: Attribute 'id' is
not allowed to appear in element 'gml:TimePeriod'.

I'm not sure which it's supposed to be, but can someone shed any light
on this apparent conflict?

Best regards,

Andy

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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

Hi Adam,

Yep - that did the job. I prefixed “id” with “gml:” and I’m onto my next problem :wink:

Thanks,

Andy

ajs6f wrote: