Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Weird namespaces when moving objects between XSD schemas
Weird namespaces when moving objects between XSD schemas [message #577224] Thu, 04 September 2003 16:12
Hayden Marchant is currently offline Hayden MarchantFriend
Messages: 90
Registered: July 2009
Member
I am merging the contents of schemas by iterating over the elements of the
referred schemas of a certain base schema and adding all the contents of
them into the base schema. Here is a snippet of my code:

XSDSchema primaryXSDSchema = getEclipseXSDSchema();

for (Iterator iterator = fReferencedXsdSchemas.iterator();
iterator.hasNext();) {
XSDSchema referredSchema = (XSDSchema) iterator.next();

primaryXSDSchema.getContents().addAll(referredSchema.getCont ents());
}

This code works nicely. However, sometimes when I run this code, I get a
weird phenomenom. The root of the schema becomes:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://ACORD.org/Standards/Life/2"
xmlns:Q1="http://www.w3.org/2001/XMLSchema"
xmlns="http://ACORD.org/Standards/Life/2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" attributeFormDefault="unqualified">

I have no idea where this Q1 comes from, but lots of the xsd elements from
the XMLSchema schema are prefixed with Q1 instead of xsd. Sometimes the
whole schema is Q1. e.g. <Q1:schema>.....

Also, when validating this schema, all elements that are of type
<Q1:string>, <Q1:integer> etc... cannot be resolved by Eclipse. There
seems to have been some duplication of XMLSchema namespaces when objects
were moved over.

Any idea what I may be doing wrong?

Thanks
Previous Topic:Treatment of annotation documentation in ecore builder
Next Topic:Treatment of annotation documentation in ecore builder
Goto Forum:
  


Current Time: Thu Apr 25 07:11:31 GMT 2024

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

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

Back to the top