Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » why isn't element declaration given "anyType" type by default
why isn't element declaration given "anyType" type by default [message #597389] Sat, 24 December 2005 02:05
Eclipse UserFriend
Originally posted by:


I am using a schema which includes an element without a type (which
should therefore default to xsd:anyType). For example:

<xsd:element name="foo"/>

However, if I create a schema using the following code,
I get a null typeDefinition for this element declaration.

XSDParser xsdp = new XSDParser();
xsdp.parse(new ByteArrayInputStream(bytes));
XSDSchema xsdSchema = xsdp.getSchema();
List elems = xsdSchema.getElementDeclarations();
XSDTypeDefinition typeDefinition =

The only time I get "anyType" is if I set the schemaLocation. This seems
If I create the schema using the XSDParser, and the schema doesn't have any
include/import/redefine directives, am I really required to set the
schemaLocation (with a bogus value) just to get this to work?

Previous Topic:Using ResourceSet with InputStream rather than URI
Next Topic:why isn't element declaration given "anyType" type by default
Goto Forum:

Current Time: Tue Jan 19 10:14:54 GMT 2021

Powered by FUDForum. Page generated in 0.01856 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top