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?
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?