Project

General

Profile

Bug #4433

children element with namespace prefix were considered invalid by parser

Added by Jing Tao about 9 years ago. Updated about 9 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
eml-parser
Target version:
Start date:
10/01/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4433

Description


<eml:eml packageId="tao.12926.1" system="knb" xmlns:eml="eml://ecoinformatics.org/eml-2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.0 eml.xsd">
<dataset>
.......
</dataset>
</eml:eml>

The above xml instance will be considered valid.

However, if we add "eml" to "dataset" and xml will look like:

<eml:eml packageId="tao.12926.1" system="knb" xmlns:eml="eml://ecoinformatics.org/eml-2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.0 eml.xsd">
<eml:dataset>
.......
</eml:dataset>
</eml:eml>

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})'

History

#1 Updated by Matt Jones about 9 years ago

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.

#2 Updated by Redmine Admin over 5 years ago

Original Bugzilla ID was 4433

Also available in: Atom PDF