Author: bimargulies
Date: Tue Apr 7 01:02:10 2009
New Revision: 762586
URL: http://svn.apache.org/viewvc?rev=762586&view=rev
Log:
WSCOMMONS-458
Just the first of many installments.
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/IncludeTest.java
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/RedefineTest.java
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
Tue Apr 7 01:02:10 2009
@@ -525,7 +525,7 @@
XmlSchemaImport handleImport(XmlSchema schema, Element importEl,
Element schemaEl) {
- XmlSchemaImport schemaImport = new XmlSchemaImport();
+ XmlSchemaImport schemaImport = new XmlSchemaImport(schema);
Element annotationEl = XDOMUtil.getFirstChildElementNS(importEl,
XmlSchema.SCHEMA_NS, "annotation");
@@ -583,7 +583,7 @@
XmlSchemaInclude handleInclude(final XmlSchema schema, Element includeEl,
Element schemaEl) {
- XmlSchemaInclude include = new XmlSchemaInclude();
+ XmlSchemaInclude include = new XmlSchemaInclude(schema);
Element annotationEl = XDOMUtil.getFirstChildElementNS(includeEl,
XmlSchema.SCHEMA_NS, "annotation");
@@ -1513,7 +1513,7 @@
private XmlSchemaRedefine handleRedefine(XmlSchema schema,
Element redefineEl, Element schemaEl) {
- XmlSchemaRedefine redefine = new XmlSchemaRedefine();
+ XmlSchemaRedefine redefine = new XmlSchemaRedefine(schema);
redefine.schemaLocation = redefineEl.getAttribute("schemaLocation");
final TargetNamespaceValidator validator = newIncludeValidator(schema);
@@ -1624,17 +1624,9 @@
}
currentSchema.items.add(element);
} else if (el.getLocalName().equals("include")) {
- XmlSchemaInclude include = handleInclude(currentSchema, el,
- schemaEl);
- currentSchema.includes.add(include);
- currentSchema.items.add(include);
-
+ handleInclude(currentSchema, el, schemaEl);
} else if (el.getLocalName().equals("import")) {
- XmlSchemaImport schemaImport = handleImport(currentSchema, el,
- schemaEl);
- currentSchema.includes.add(schemaImport);
- currentSchema.items.add(schemaImport);
-
+ handleImport(currentSchema, el, schemaEl);
} else if (el.getLocalName().equals("group")) {
XmlSchemaGroup group = handleGroup(currentSchema, el, schemaEl);
currentSchema.groups.collection.put(group.getQName(), group);
@@ -1653,9 +1645,7 @@
currentSchema.attributes.collection.put(attr.getQName(), attr);
currentSchema.items.add(attr);
} else if (el.getLocalName().equals("redefine")) {
- XmlSchemaRedefine redefine = handleRedefine(currentSchema, el,
- schemaEl);
- currentSchema.includes.add(redefine);
+ handleRedefine(currentSchema, el, schemaEl);
} else if (el.getLocalName().equals("notation")) {
XmlSchemaNotation notation = handleNotation(currentSchema, el);
currentSchema.notations.collection.put(notation.getQName(),
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
Tue Apr 7 01:02:10 2009
@@ -24,8 +24,10 @@
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Stack;
@@ -44,6 +46,7 @@
import
org.apache.ws.commons.schema.XmlSchemaSerializer.XmlSchemaSerializerException;
import org.apache.ws.commons.schema.utils.NamespaceContextOwner;
import org.apache.ws.commons.schema.utils.NamespacePrefixList;
+import org.custommonkey.xmlunit.XMLConstants;
/**
* Contains the definition of a schema. All XML Schema definition language
(XSD) elements are children of the
@@ -51,7 +54,7 @@
*/
public class XmlSchema
extends XmlSchemaAnnotated implements NamespaceContextOwner {
- static final String SCHEMA_NS = "http://www.w3.org/2001/XMLSchema";
+ static final String SCHEMA_NS = XMLConstants.W3C_XML_SCHEMA_NS_URI;
private static final String UTF_8_ENCODING = "UTF-8";
XmlSchemaForm attributeFormDefault;
@@ -65,7 +68,6 @@
XmlSchemaObjectTable schemaTypes;
XmlSchemaDerivationMethod blockDefault;
XmlSchemaDerivationMethod finalDefault;
- XmlSchemaObjectCollection includes;
XmlSchemaObjectCollection items;
boolean isCompiled;
String syntacticalTargetNamespace;
@@ -74,24 +76,12 @@
String schemaNamespacePrefix = "";
XmlSchemaCollection parent;
+ private List<XmlSchemaExternal> externals;
private NamespacePrefixList namespaceContext;
// keep the encoding of the input
private String inputEncoding;
/**
- * Creates new XmlSchema Create a new XmlSchema. The schema is <i>not</i>
added to the parent collection,
- * since it has no target namespace when created through this constructor.
Call
- * {...@link XmlSchema#XmlSchema(String, XmlSchemaCollection)} instead.
- *
- * @param parent the parent XmlSchemaCollection
- * @deprecated
- */
- @Deprecated
- public XmlSchema(XmlSchemaCollection parent) {
- this(null, null, parent);
- }
-
- /**
* Create a schema that is not a member of a collection.
*/
public XmlSchema() {
@@ -112,7 +102,7 @@
blockDefault = XmlSchemaDerivationMethod.NONE;
finalDefault = XmlSchemaDerivationMethod.NONE;
items = new XmlSchemaObjectCollection();
- includes = new XmlSchemaObjectCollection();
+ externals = new ArrayList<XmlSchemaExternal>();
elements = new XmlSchemaObjectTable();
attributeGroups = new XmlSchemaObjectTable();
attributes = new XmlSchemaObjectTable();
@@ -192,9 +182,9 @@
if (deep) {
if (element == null) {
// search the imports
- for (Iterator includedItems = includes.getIterator();
includedItems.hasNext();) {
+ for (XmlSchemaExternal item : externals) {
- XmlSchema schema = getSchema(includedItems.next());
+ XmlSchema schema = getSchema(item);
if (schema != null) {
// create an empty stack - push the current parent in
@@ -228,9 +218,9 @@
if (deep) {
if (group == null) {
// search the imports
- for (Iterator includedItems = includes.getIterator();
includedItems.hasNext();) {
+ for (XmlSchemaExternal item : externals) {
- XmlSchema schema = getSchema(includedItems.next());
+ XmlSchema schema = getSchema(item);
if (schema != null) {
// create an empty stack - push the current parent in
@@ -262,9 +252,9 @@
if (deep) {
if (attribute == null) {
// search the imports
- for (Iterator includedItems = includes.getIterator();
includedItems.hasNext();) {
+ for (XmlSchemaExternal item : externals) {
- XmlSchema schema = getSchema(includedItems.next());
+ XmlSchema schema = getSchema(item);
if (schema != null) {
// create an empty stack - push the current parent in
@@ -298,9 +288,9 @@
if (deep) {
if (group == null) {
// search the imports
- for (Iterator includedItems = includes.getIterator();
includedItems.hasNext();) {
+ for (XmlSchemaExternal item : externals) {
- XmlSchema schema = getSchema(includedItems.next());
+ XmlSchema schema = getSchema(item);
if (schema != null) {
// create an empty stack - push the current parent in
@@ -334,9 +324,9 @@
if (deep) {
if (notation == null) {
// search the imports
- for (Iterator includedItems = includes.getIterator();
includedItems.hasNext();) {
+ for (XmlSchemaExternal item : externals) {
- XmlSchema schema = getSchema(includedItems.next());
+ XmlSchema schema = getSchema(item);
if (schema != null) {
// create an empty stack - push the current parent in
@@ -410,9 +400,9 @@
if (deep) {
if (type == null) {
// search the imports
- for (Iterator includedItems = includes.getIterator();
includedItems.hasNext();) {
+ for (XmlSchemaExternal item : externals) {
- XmlSchema schema = getSchema(includedItems.next());
+ XmlSchema schema = getSchema(item);
if (schema != null) {
// create an empty stack - push the current parent
@@ -516,8 +506,12 @@
return groups;
}
- public XmlSchemaObjectCollection getIncludes() {
- return includes;
+ /**
+ * Return the includes, imports, and redefines.
+ * @return a list of the objects representing includes, imports, and
redefines.
+ */
+ public List<XmlSchemaExternal> getExternals() {
+ return externals;
}
public boolean isCompiled() {
@@ -800,5 +794,9 @@
return parent;
}
+ void setExternals(List<XmlSchemaExternal> externals) {
+ this.externals = externals;
+ }
+
}
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java
Tue Apr 7 01:02:10 2009
@@ -26,13 +26,15 @@
public abstract class XmlSchemaExternal extends XmlSchemaAnnotated {
XmlSchema schema;
-
String schemaLocation;
/**
* Creates new XmlSchemaExternal
*/
- protected XmlSchemaExternal() {
+ protected XmlSchemaExternal(XmlSchema parent) {
+ this.schema = parent;
+ parent.getExternals().add(this);
+ parent.getItems().add(this);
}
public XmlSchema getSchema() {
@@ -43,10 +45,6 @@
return schemaLocation;
}
- public void setSchema(XmlSchema schema) {
- this.schema = schema;
- }
-
public void setSchemaLocation(String schemaLocation) {
this.schemaLocation = schemaLocation;
}
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java
Tue Apr 7 01:02:10 2009
@@ -31,8 +31,8 @@
/**
* Creates new XmlSchemaImport
*/
- public XmlSchemaImport() {
- super();
+ public XmlSchemaImport(XmlSchema parent) {
+ super(parent);
}
public String getNamespace() {
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java
Tue Apr 7 01:02:10 2009
@@ -29,8 +29,8 @@
/**
* Creates new XmlSchemaInclude
*/
- public XmlSchemaInclude() {
- super();
+ public XmlSchemaInclude(XmlSchema parent) {
+ super(parent);
}
}
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java
Tue Apr 7 01:02:10 2009
@@ -36,7 +36,8 @@
/**
* Creates new XmlSchemaRedefine
*/
- public XmlSchemaRedefine() {
+ public XmlSchemaRedefine(XmlSchema parent) {
+ super(parent);
items = new XmlSchemaObjectCollection();
schemaTypes = new XmlSchemaObjectTable();
groups = new XmlSchemaObjectTable();
Modified:
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/IncludeTest.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/IncludeTest.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/IncludeTest.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/IncludeTest.java
Tue Apr 7 01:02:10 2009
@@ -22,6 +22,7 @@
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -32,8 +33,8 @@
import org.apache.ws.commons.schema.XmlSchema;
import org.apache.ws.commons.schema.XmlSchemaCollection;
import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaExternal;
import org.apache.ws.commons.schema.XmlSchemaInclude;
-import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
import org.junit.Assert;
import org.junit.Test;
@@ -64,14 +65,14 @@
XmlSchemaCollection schemaCol = new XmlSchemaCollection();
XmlSchema schema = schemaCol.read(new StreamSource(is), null);
- XmlSchemaObjectCollection c = schema.getIncludes();
- assertEquals(2, c.getCount());
+ List<XmlSchemaExternal> c = schema.getExternals();
+ assertEquals(2, c.size());
Set<String> set = new HashSet<String>();
set.add(Resources.asURI("include2.xsd"));
set.add(Resources.asURI("include3.xsd"));
- for (int i = 0; i < c.getCount(); i++) {
- XmlSchemaInclude include = (XmlSchemaInclude)c.getItem(i);
+ for (int i = 0; i < c.size(); i++) {
+ XmlSchemaInclude include = (XmlSchemaInclude)c.get(i);
assertNotNull(include);
XmlSchema s = include.getSchema();
assertNotNull(s);
@@ -121,10 +122,10 @@
XmlSchemaCollection schemaCol = new XmlSchemaCollection();
XmlSchema schema = schemaCol.read(is, null);
- XmlSchemaObjectCollection c = schema.getIncludes();
- assertEquals(1, c.getCount());
+ List<XmlSchemaExternal> c = schema.getExternals();
+ assertEquals(1, c.size());
- XmlSchemaInclude schemaInclude = (XmlSchemaInclude)c.getItem(0);
+ XmlSchemaInclude schemaInclude = (XmlSchemaInclude)c.get(0);
assertNotNull(schemaInclude);
XmlSchema schema2 = schemaInclude.getSchema();
Modified:
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/RedefineTest.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/RedefineTest.java?rev=762586&r1=762585&r2=762586&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/RedefineTest.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/RedefineTest.java
Tue Apr 7 01:02:10 2009
@@ -23,6 +23,7 @@
import java.io.InputStream;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -36,6 +37,7 @@
import org.apache.ws.commons.schema.XmlSchemaComplexType;
import org.apache.ws.commons.schema.XmlSchemaContentModel;
import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaExternal;
import org.apache.ws.commons.schema.XmlSchemaGroup;
import org.apache.ws.commons.schema.XmlSchemaGroupRef;
import org.apache.ws.commons.schema.XmlSchemaMaxInclusiveFacet;
@@ -89,10 +91,10 @@
assertEquals("vip", xse.getName());
assertEquals(new QName("http://soapinterop.org/types", "person"),
xse.getSchemaTypeName());
- XmlSchemaObjectCollection xsoc = schema.getIncludes();
- assertEquals(1, xsoc.getCount());
+ List<XmlSchemaExternal> xsoc = schema.getExternals();
+ assertEquals(1, xsoc.size());
- XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.getItem(0);
+ XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.get(0);
xsot = xsr.getSchemaTypes();
assertEquals(1, xsot.getCount());
@@ -162,10 +164,10 @@
assertEquals("childsizedrink", xse.getName());
assertEquals(new QName("http://soapinterop.org/types", "drinksize"),
xse.getSchemaTypeName());
- XmlSchemaObjectCollection xsoc = schema.getIncludes();
- assertEquals(1, xsoc.getCount());
+ List<XmlSchemaExternal> xsoc = schema.getExternals();
+ assertEquals(1, xsoc.size());
- XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.getItem(0);
+ XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.get(0);
xsot = xsr.getSchemaTypes();
assertEquals(1, xsot.getCount());
@@ -183,12 +185,12 @@
XmlSchemaSimpleTypeRestriction xsstr =
(XmlSchemaSimpleTypeRestriction)xsst.getContent();
assertEquals(new QName("http://soapinterop.org/types", "drinksize"),
xsstr.getBaseTypeName());
- xsoc = xsstr.getFacets();
+ XmlSchemaObjectCollection facets = xsstr.getFacets();
Set<String> s = new HashSet<String>();
s.add(XmlSchemaMinInclusiveFacet.class.getName());
s.add(XmlSchemaMaxInclusiveFacet.class.getName());
- for (Iterator i = xsoc.getIterator(); i.hasNext();) {
+ for (Iterator i = facets.getIterator(); i.hasNext();) {
Object o = i.next();
assertTrue(s.remove(o.getClass().getName()));
if (o instanceof XmlSchemaMinInclusiveFacet) {
@@ -229,10 +231,10 @@
XmlSchemaCollection schemaCol = new XmlSchemaCollection();
XmlSchema schema = schemaCol.read(new StreamSource(is), null);
- XmlSchemaObjectCollection xsoc = schema.getIncludes();
- assertEquals(1, xsoc.getCount());
+ List<XmlSchemaExternal> xsoc = schema.getExternals();
+ assertEquals(1, xsoc.size());
- XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.getItem(0);
+ XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.get(0);
XmlSchemaObjectTable xsot = xsr.getGroup();
assertEquals(1, xsot.getCount());
@@ -247,13 +249,13 @@
XmlSchemaSequence xss = (XmlSchemaSequence)xsg.getParticle();
- xsoc = xss.getItems();
- assertEquals(2, xsoc.getCount());
+ XmlSchemaObjectCollection sequenceItems = xss.getItems();
+ assertEquals(2, sequenceItems.getCount());
Set<String> s = new HashSet<String>();
s.add(XmlSchemaGroupRef.class.getName());
s.add(XmlSchemaElement.class.getName());
- for (Iterator i = xsoc.getIterator(); i.hasNext();) {
+ for (Iterator i = sequenceItems.getIterator(); i.hasNext();) {
Object o = i.next();
assertTrue(s.remove(o.getClass().getName()));
if (o instanceof XmlSchemaGroupRef) {
@@ -294,10 +296,10 @@
XmlSchemaCollection schemaCol = new XmlSchemaCollection();
XmlSchema schema = schemaCol.read(new StreamSource(is), null);
- XmlSchemaObjectCollection xsoc = schema.getIncludes();
- assertEquals(1, xsoc.getCount());
+ List<XmlSchemaExternal> xsoc = schema.getExternals();
+ assertEquals(1, xsoc.size());
- XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.getItem(0);
+ XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.get(0);
XmlSchemaObjectTable xsot = xsr.getAttributeGroup();
assertEquals(1, xsot.getCount());
@@ -312,12 +314,12 @@
assertNotNull(xsag);
assertEquals("AttribGroup", xsag.getName());
- xsoc = xsag.getAttributes();
+ XmlSchemaObjectCollection attributes = xsag.getAttributes();
Set<String> s = new HashSet<String>();
s.add("type");
s.add("units");
- for (Iterator i = xsoc.getIterator(); i.hasNext();) {
+ for (Iterator i = attributes.getIterator(); i.hasNext();) {
XmlSchemaAttribute xsa = (XmlSchemaAttribute)i.next();
assertTrue(s.remove(xsa.getName()));
}
@@ -377,10 +379,10 @@
assertEquals("vip", xse.getName());
assertEquals(new QName("http://soapinterop.org/types", "person"),
xse.getSchemaTypeName());
- XmlSchemaObjectCollection xsoc = schema.getIncludes();
- assertEquals(1, xsoc.getCount());
+ List<XmlSchemaExternal> xsoc = schema.getExternals();
+ assertEquals(1, xsoc.size());
- XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.getItem(0);
+ XmlSchemaRedefine xsr = (XmlSchemaRedefine)xsoc.get(0);
xsot = xsr.getSchemaTypes();
assertEquals(1, xsot.getCount());