Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » How to update imported schema files
How to update imported schema files [message #602733] Thu, 06 December 2007 21:28
mike is currently offline mike
Messages: 35
Registered: July 2009
Member
I have a requirement to open a XSD schema file that has references to
other schemas by 'import', add my attributes to some types defined in the
imported schemas, and finally save these changed schemas. To simplify the
case, the imported schemas are assumed to be all in the local file system
and are editable. I have no problem loading the main XSD, parsing it to
locate the DOM objects that I want to add my own attributes to and update
it. Everything is going on well but I can't save the changes I made to the
definitions to the imported schemas.

As an example:

I open the main schema, A.xsd which imports B.xsd that imports C.xsd. In
C.xsd, a type is defined as:

<xsd:sequence>
<xsd:element name="description" type="xsd:string"/>
</xsd:sequence>

What I need to do is to change this definition to:
<xsd:sequence>
<xsd:element name="description" type="xsd:string" myOwnAttribute="value"/>
</xsd:sequence>

And finally save this change.

I then try to serializ the DOM of the main schema, hoping to save the
change to C.xsd.

I loaded the main schema from A.xsd which internally populated all the
type definitions from imported B.xsd and C.xsd. But when I serialize the
edited DOM object, C.xsd is not being saved with the added attributes
because C.xsd was never explicitly loaded. In fact, only schema defined in
A.xsd is saved.

When all the types are defined in one file, I have no problem saving the
changes.

Is there a way to save changes to the imported schemas?
Previous Topic:[Announce] The EclipseCon 2008 Submission Deadline is Rapidly Approaching.
Next Topic:How to update imported schema files
Goto Forum:
  


Current Time: Thu Oct 23 17:19:28 GMT 2014

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

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