Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Schema Merging
Schema Merging [message #602323] Thu, 26 April 2007 14:47
Klaus Schaefers is currently offline Klaus Schaefers
Messages: 24
Registered: July 2009
Junior Member
Hi,

I'm trying to generate a new Schema based on an old Schema that conatins
all included / imported schemas. E.g. a includes B & C then the new schema
D schould contain all types of A, B and C.

I have tried it like this:

XSDSchema newSchema = XSDSchemaBuildingTools.getBlankSchema(factory,...);

...

list complexTypes = getAllComplexTypesRecursivly.

for(ComplexType type: complexTypes)
{
newSchema.getContents().add(type).
}

When I try to sreialize the new Schema with Xerces i got the following
error:
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a
different document than the one that created it.
at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknow n Source)
at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.forceNiceInser tBefore(XSDConcreteComponentImpl.java:1590)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.niceInsertBefo re(XSDConcreteComponentImpl.java:1514)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.handleElementF orAdopt(XSDConcreteComponentImpl.java:1367)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.updateElement( XSDConcreteComponentImpl.java:366)

Does anybody have a hint?

Kind regards,

klaus
Previous Topic:problems at pattern facet creation/validation
Next Topic:Schema Merging
Goto Forum:
  


Current Time: Thu Oct 23 09:33:08 GMT 2014

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

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