|Weird namespaces when moving objects between XSD schemas [message #577224]
||Thu, 04 September 2003 16:12
| Hayden Marchant
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();
XSDSchema referredSchema = (XSDSchema) iterator.next();
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"?>
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?
Powered by FUDForum
. Page generated in 0.04281 seconds