Java Code Examples for com.sun.org.apache.xerces.internal.xs.XSConstants#DERIVATION_LIST
The following examples show how to use
com.sun.org.apache.xerces.internal.xs.XSConstants#DERIVATION_LIST .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XSDSimpleTypeTraverser.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 2
Source File: XSDSimpleTypeTraverser.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 3
Source File: XSDSimpleTypeTraverser.java From hottub with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 4
Source File: XSDSimpleTypeTraverser.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 5
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 6
Source File: XSDSimpleTypeTraverser.java From Bytecoder with Apache License 2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 7
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 8
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 9
Source File: XSDSimpleTypeTraverser.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 10
Source File: XSDSimpleTypeTraverser.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private XSSimpleType errorType(String name, String namespace, short refType) { XSSimpleType stringType = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getTypeDefinition("string"); switch (refType) { case XSConstants.DERIVATION_RESTRICTION: return fSchemaHandler.fDVFactory.createTypeRestriction(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_LIST: return fSchemaHandler.fDVFactory.createTypeList(name, namespace, (short)0, stringType, null); case XSConstants.DERIVATION_UNION: return fSchemaHandler.fDVFactory.createTypeUnion(name, namespace, (short)0, new XSSimpleType[]{stringType}, null); } return null; }
Example 11
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 12
Source File: XSDSimpleTypeTraverser.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 13
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 14
Source File: XSDSimpleTypeTraverser.java From JDKSourceCode1.8 with MIT License | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 15
Source File: XSDSimpleTypeTraverser.java From Bytecoder with Apache License 2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 16
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 17
Source File: XSDSimpleTypeTraverser.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 18
Source File: XSDSimpleTypeTraverser.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 19
Source File: XSDSimpleTypeTraverser.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }
Example 20
Source File: XSDSimpleTypeTraverser.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, baseTypeStr, elm); if (baseType == null) { return null; } if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE) { reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } // if it's a complex type, or if its restriction of anySimpleType if (baseType == SchemaGrammar.fAnySimpleType && baseRefContext == XSConstants.DERIVATION_RESTRICTION) { // if the base type is anySimpleType and the current type is // a S4S built-in type, return null. (not an error). if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { return null; } reportSchemaError("cos-st-restricts.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); return null; } if ((baseType.getFinal() & baseRefContext) != 0) { if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { reportSchemaError("st-props-correct.3", new Object[]{refName, baseTypeStr.rawname}, elm); } else if (baseRefContext == XSConstants.DERIVATION_LIST) { reportSchemaError("cos-st-restricts.2.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } else if (baseRefContext == XSConstants.DERIVATION_UNION) { reportSchemaError("cos-st-restricts.3.3.1.1", new Object[]{baseTypeStr.rawname, refName}, elm); } return null; } return (XSSimpleType)baseType; }