W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2002

Two elements FooFoo with different types in a sequence? Is this possible?

From: Test1 <test1@w3.org>
Date: Mon, 4 Feb 2002 05:45:39 -0500 (EST)
To: <xmlschema-dev@w3.org>
Message-ID: <000001c1accc$bc108670$0100007f@brainware.ch>
Hi XML Schema Gurus

I want do this:

<xsd:complexType name="Foo">

         <xsd:element name="FooFoo" type="xsd:string"/>
         <xsd:element name="FooFoo" type="xsd:integer"/>


Because I want to validate a xml like this:


In detail I want to validate the number and content of the FooFoo elements.
The FooFoo element content type is(could be) different for each FooFoo
in the Foo element.

But it dosen't work...
Parsing error:  Schema error: duplicate element decl in the same scope with
different types : FooFoo.

Is there a way to do something like this with xsd?
Has some body a solution/ workaround for this probelm or ...?
Or a hint?

It's importend for me that the element name for an element in the element
is every time FooFoo. Because I wan't write an engine that validate, parses
different xml
files and write there data into a database. Therefore the element
structure(Names) should be
always the same. But it should be possible to write a xsd file for each
input xml file
to validate the number and content of the FooFoo elements.

Thanx a lot...

Received on Monday, 4 February 2002 05:49:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:58 UTC