Project

General

Profile

Actions

Bug #1008

closed

inline element doesn't support character child

Added by Jing Tao about 21 years ago. Updated over 20 years ago.

Status:
Resolved
Priority:
Normal
Category:
eml - general bugs
Target version:
Start date:
03/07/2003
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
1008

Description

Today, when we tried to upload an eml2 doucment with inline charater data
to Metacat, a error was shown that inline element can only have element
children and can't have a character child(inline element is defined in
eml-resource.xsd). However, inline element supposes to support characters
children.
Something is wrong.

We took a look on the definition and found the children of inline is
defined as "any". So it seemes schema only consider the "any"
just for elements come from any namespace and we couldn't put characters
in there. This is different to dtd "any". In dtd, "any" can be considered
as elements or characters.

Dan found an text type defined in w3c primer web site:
<xsd:complexType name="text">
<xsd:complexContent mixed="true">
<xsd:restriction base="xsd:anyType">
<xsd:sequence>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute ref="xml:lang"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>

It allows an unrestricted mixture of character content and element content
from any namespace.

I wrote an very simple schema which contains the text type and a xml
instance. Then using xerces to validate the xml instance by the schema. It
works fine if we delete the line: <xsd:attribute ref="xml:lang"/> in the
complex type definition.

So, can we use this type to replace the anonymous type for inline or other
place which use "any"?

Actions #1

Updated by David Blankman over 20 years ago

Used Dan's schema fragment to modify eml-resource.xsd. Created a new type called
InlineType. The inline element is now of type res:InlineType. I also modified
the inline element in eml-physical.xsd to be of type res:InlineType. I tested
various data files: data pasted from an ascii text file, an excel file, and
finally a base64 encoded file. All three validated using EMLParser modified to
point to the modified schemas.

Modified schemas have been checked into cvs.ecoinformatics.org.

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 1008

Actions

Also available in: Atom PDF