void appendTypeInfo(StringBuffer str) { String contentType[] = {"EMPTY", "SIMPLE", "ELEMENT", "MIXED"}; String derivedBy[] = {"EMPTY", "EXTENSION", "RESTRICTION"}; str.append("Complex type name='").append(fTargetNamespace).append(',').append(getTypeName()).append("', "); if (fBaseType != null) { str.append(" base type name='").append(fBaseType.getName()).append("', "); } str.append(" content type='").append(contentType[fContentType]).append("', "); str.append(" isAbstract='").append(getAbstract()).append("', "); str.append(" hasTypeId='").append(containsTypeID()).append("', "); str.append(" final='").append(fFinal).append("', "); str.append(" block='").append(fBlock).append("', "); if (fParticle != null) { str.append(" particle='").append(fParticle.toString()).append("', "); } str.append(" derivedBy='").append(derivedBy[fDerivedBy]).append("'. "); }
public static boolean checkComplexType(XSTypeDefinition td) { if (td.getTypeCategory() != XSTypeDefinition.COMPLEX_TYPE) { return false; } XSComplexTypeDefinition ctd = (XSComplexTypeDefinition) td; if (ctd.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_ELEMENT) { return true; } if ((td instanceof XSComplexTypeDecl) && ((XSComplexTypeDecl) td).getAbstract()) { return true; } if (TEXT_ELEMENTS_ARE_COMPLEX) { return true; } if (ctd.getAttributeUses() != null) { for (int i = 0; i < ctd.getAttributeUses().getLength(); i++) { XSSimpleTypeDefinition xsstd = ((XSAttributeUse) ctd.getAttributeUses().item(i)).getAttrDeclaration() .getTypeDefinition(); if ("ID".equals(xsstd.getName())) { continue; } return true; } } return false; }
ctd.setValues(o.getName(), ctd1.getNamespace(), ctd1.getBaseType(), ctd1.getDerivationMethod(), ctd1.getFinal(), ctd1.getProhibitedSubstitutions(), ctd1.getContentType(), ctd1.getAbstract(), ctd1.getAttrGrp(), (XSSimpleType) ctd1.getSimpleType(), (XSParticleDecl) ctd1.getParticle(), annotations );
if (ctype.getAbstract()) { reportSchemaError("cvc-type.2", new Object[] { element.rawname });