protected final AttributeType xsAnyType() { XSDSchema schema = XSDUtil.getSchemaForSchema(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001); for ( Iterator i = schema.getTypeDefinitions().iterator(); i.hasNext(); ) { XSDTypeDefinition t = (XSDTypeDefinition) i.next(); if ( XS.ANYTYPE.getLocalPart().equals( t.getName() ) ) { return findType(t); } } throw new IllegalStateException("XS schema not present"); }
int pType = XSDUtil.nodeType(particle.getElement());
new Object [] populateDiagnostic (xsdDiagnostic, "content-valid.1", new Object [] { XSDConstants.uri(child), xsdComplexTypeDefinition.getURI(), getExpected(state) }) })); xsdDiagnostic.setAnnotationURI(part + "#" + anchor); new Object [] populateDiagnostic (xsdDiagnostic, "content-valid.3", new Object [] populateDiagnostic (xsdDiagnostic, "content-valid.2", new Object [] { xsdComplexTypeDefinition.getURI(), getExpected(state) }) })); xsdDiagnostic.setAnnotationURI(part + "#" + anchor);
/** * Checks the given element's content against the complex type with a given name retrieved from the given schema. * @param schema the schema used to retrieve the complex type definition. * @param complexTypeName the name of the complex type. * @param part annotation part. * @param anchor annotation anchor. * @param element the element whose content to check. * @return a list of partially populated XSDDiagnostics---the primary component is not set---or the empty list if the content is valid. * @since 2.5 */ public static List<XSDDiagnostic> checkComplexContent(XSDSchema schema, String complexTypeName, String part, String anchor, Element element) { XSDComplexTypeDefinition xsdComplexTypeDefinition = schema.resolveComplexTypeDefinition(complexTypeName); return checkComplexContent(xsdComplexTypeDefinition, part, anchor, element); }
if (value.contains("child:") && xsdSimpleTypeDefinition != null && XSDUtil.isSchemaForSchemaNamespace(xsdSimpleTypeDefinition.getTargetNamespace()))
protected XSDDiagnostic checkComplexContent (XSDComplexTypeDefinition xsdComplexTypeDefinition, String part, String anchor, Element element) { List<XSDDiagnostic> xsdDiagnostics = XSDUtil.checkComplexContent(xsdComplexTypeDefinition, part, anchor, element); for (XSDDiagnostic xsdDiagnostic : xsdDiagnostics) { xsdDiagnostic.setPrimaryComponent(this); } getDiagnostics().addAll(xsdDiagnostics); return xsdDiagnostics.isEmpty() ? null : xsdDiagnostics.get(xsdDiagnostics.size() - 1); }
public static void main(String[] args) throws Exception { XSDSchema schema = XSDUtil.getSchemaForSchema(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001); SchemaGenerator generator = new SchemaGenerator(schema); generator.setComplexTypes(false); generator.setFollowComplexTypes(false); generator.setSimpleTypes(true); generator.generate(); }
int pType = XSDUtil.nodeType(particle.getElement());
XSDUtil.getSchemaForSchema(XSDUtil.SCHEMA_FOR_SCHEMA_URI_2001) .getSimpleTypeIdMap() .get("string");
int pType = XSDUtil.nodeType(particle.getElement());
XSDSchema xsdSchemaForSchema = XSDUtil./*{@link XSDUtil#getSchemaForSchema */getSchemaForSchema/*}*/(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001); ResourceSet resourceSet = xsdSchemaForSchema./*{@link EObject#eResource */eResource/*}*/()./*{@link Resource#getResourceSet */getResourceSet/*}*/();
int pType = XSDUtil.nodeType(particle.getElement());
XSDSchema xsdSchemaForSchema = XSDUtil./*{@link XSDUtil#getSchemaForSchema */getSchemaForSchema/*}*/(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001); ResourceSet resourceSet = xsdSchemaForSchema./*{@link EObject#eResource */eResource/*}*/()./*{@link Resource#getResourceSet */getResourceSet/*}*/();
int pType = XSDUtil.nodeType(particle.getElement());
XSDSimpleTypeDefinition type = (XSDSimpleTypeDefinition) XSDUtil.getSchemaForSchema(XSDUtil.SCHEMA_FOR_SCHEMA_URI_2001) .getSimpleTypeIdMap() .get("string");
XSDSimpleTypeDefinition type = (XSDSimpleTypeDefinition) XSDUtil.getSchemaForSchema(XSDUtil.SCHEMA_FOR_SCHEMA_URI_2001) .getSimpleTypeIdMap() .get("string");
XSDUtil.getSchemaForSchema( XSDUtil.SCHEMA_FOR_SCHEMA_URI_2001 ) .getSimpleTypeIdMap().get( "string" );