NCEAS / eml

Ecological Metadata Language (EML)
https://eml.ecoinformatics.org/
GNU General Public License v2.0
40 stars 15 forks source link

children element with namespace prefix were considered invalid by parser #236

Open mbjones opened 7 years ago

mbjones commented 7 years ago

Author Name: Jing Tao (Jing Tao) Original Redmine Issue: 4433, https://projects.ecoinformatics.org/ecoinfo/issues/4433 Original Date: 2009-10-01 Original Assignee: Matt Jones


<?xml version="1.0"?>

....... The above xml instance will be considered valid. However, if we add "eml" to "dataset" and xml will look like: ....... Parser will give an error like: cvc-complex-type.2.4.a: Invalid content starting with element 'eml:dataset'. The content must match '((("":access){0-1},(((("":dataset)|("":citation))|("":software))|("":protocol))),("":additionalMetadata){0-UNBOUNDED})'
mbjones commented 7 years ago

Original Redmine Comment Author Name: Matt Jones (Matt Jones) Original Date: 2009-10-01T21:22:26Z


Note that the validator message is asserting that the child elements should be unqualified (see the ": at the beginning of each expected element. I suspect this is related to the EML use of the namespace qualification attributes, and so is probably a truly invalid document. One could argue that EML does not use elementFormDefault properly, so maybe that would be a legitimate bug. But I think the parser is correct in this case. See my email to eml-dev on this topic.

mbjones commented 7 years ago

Original Redmine Comment Author Name: Redmine Admin (Redmine Admin) Original Date: 2013-03-27T21:26:50Z


Original Bugzilla ID was 4433