Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Problems with <redefine>
Problems with <redefine> [message #594678] Thu, 07 April 2005 02:07
Eclipse UserFriend
Originally posted by:

Hi all,

I'm trying to access a schema containing a <redefine> section and am
getting unexpected results.

I have a basic schema (test,xsd):

<schema xmlns=""
targetNamespace="" xmlns:sdk="">
<element name="toplevel">
<annotation sdk:caption="TOP LEVEL"/>
<element ref="sdk:base" />
<complexType name="base-type">
<attribute name="attr1" type="string" />
<element name="base" type="sdk:base-type" />

which I can use with the following instance document (test.xml):

<toplevel xmlns=""
xsi:schemaLocation=" file:c:/Temp/test.xsd">
<base attr1="Attribute 1"/>

If I load and query the schema:

XSDResourceImpl xsdResource = (XSDResourceImpl)
resourceSet.getResource(uri, true);
XSDSchema schema = xsdResource.getSchema();
XSDAnnotation annotation =

then my annotation contains (as expected) the 'sdk:caption' attribute.

I then perform exactly the same steps again but now using a redefined
schema (redefined.xsd):

<schema xmlns=""
targetNamespace="" xmlns:sdk="">
<redefine schemaLocation="file:c:/temp/test.xsd">
<complexType name="base-type">
<extension base="sdk:base-type">
<attribute name="added" type="string" />

with the extended instance document (redefined.xml):

<toplevel xmlns=""
xsi:schemaLocation=" file:c:/Temp/redefined.xsd">
<base attr1="Attribute 1" added="Added"/>

When I load and query the schema (exactly as before) the 'toplevel'
annotation element now has 0 attributes.

Have I stumbled over a bug or is this not the way redefines are supposed
to work?

Thanks in advance,
Lewis Gardner
Previous Topic:How to get the XSDAttributeUse from a DOM-Node?
Next Topic:Problems with <redefine>
Goto Forum:

Current Time: Sun Apr 22 16:47:36 GMT 2018

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

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