Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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
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);

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=""
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?

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

Current Time: Tue Aug 04 17:11:18 GMT 2020

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

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

Back to the top