[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Element + complextype name in xml schema

From: Zafar Abbas <zafara@microsoft.com>
Date: Fri, 8 Apr 2005 11:21:11 -0700
Message-ID: <563BD3496D37BB4B9F4E8F896A58F2B304AF6FD2@RED-MSG-50.redmond.corp.microsoft.com>
To: "Nicolas Mailhot" <nicolas.mailhot@laposte.net>, <xmlschema-dev@w3.org>
complextype name

It's not allowed.

The complex type under the element has to be an anonymous type [1]:

<element>s within <schema> produce global element declarations;
<element>s within <group> or <complexType> produce either particles
which contain global element declarations (if there's a ref attribute)
or local declarations (otherwise). For complete declarations, top-level
or local, the type attribute is used when the declaration can use a
built-in or pre-declared type definition. Otherwise an anonymous
<simpleType> or <complexType> is provided inline.


http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures-with-errat
a.html#declare-element



-----Original Message-----
From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org]
On Behalf Of Nicolas Mailhot
Sent: Friday, April 08, 2005 7:58 AM
To: xmlschema-dev@w3.org
Subject: Element + complextype name in xml schema


Hi,

I've been sent an xsd that uses the following construct :

<xsi:element name="foo">
  <xsi:complexType name="foo">

Is this something allowed ? I couldn't find anything that said it's
wrong, but at the same time I have an xml parser that chokes on it and
none of the public xsd examples I've ever seen used it. I'd like to
know if I should file a bug on the parser or if I can tell the people
that send me the schema their definition does not fly.

I've little experience on xml schemas so far though it looks like I'm
up for an accelerated course.

Regards,

-- 
Nicolas Mailhot
Received on Friday, 8 April 2005 18:21:13 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.