Package org.apache.xerces.impl.xs
Class XSConstraints
java.lang.Object
org.apache.xerces.impl.xs.XSConstraints
Constraints shared by traversers and validator
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XSConstraints.java 774786 2009-05-14 14:31:10Z sandygao $
- Author:
- Sandy Gao, IBM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckComplexDerivationOk(XSComplexTypeDecl derived, org.apache.xerces.xs.XSTypeDefinition base, short block) check whether complex type derived is valid derived from base, given a subset of {restriction, extension}.static voidcheckElementDeclsConsistent(XSComplexTypeDecl type, XSParticleDecl particle, SymbolHash elemDeclHash, SubstitutionGroupHandler sgHandler) static booleancheckSimpleDerivationOk(XSSimpleType derived, org.apache.xerces.xs.XSTypeDefinition base, short block) check whether simple type derived is valid derived from base, given a subset of {restriction, extension}.static booleancheckTypeDerivationOk(org.apache.xerces.xs.XSTypeDefinition derived, org.apache.xerces.xs.XSTypeDefinition base, short block) check whether derived is valid derived from base, given a subset of {restriction, extension}.Bstatic ObjectElementDefaultValidImmediate(org.apache.xerces.xs.XSTypeDefinition type, String value, ValidationContext context, ValidatedInfo vinfo) check whether a value is a valid default for some type returns the compiled form of the value The parameter value could be either a String or a ValidatedInfo objectstatic voidfindElemInTable(XSComplexTypeDecl type, XSElementDecl elem, SymbolHash elemDeclHash) static voidfullSchemaChecking(XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter) used to check the 3 constraints against each complex type (should be each model group): Unique Particle Attribution, Particle Derivation (Restriction), Element Declrations Consistent.static XSParticleDeclstatic booleanoverlapUPA(Object decl1, Object decl2, SubstitutionGroupHandler sgHandler) static booleanoverlapUPA(XSElementDecl element1, XSElementDecl element2, SubstitutionGroupHandler sgHandler) static booleanoverlapUPA(XSElementDecl element, XSWildcardDecl wildcard, SubstitutionGroupHandler sgHandler) static booleanoverlapUPA(XSWildcardDecl wildcard1, XSWildcardDecl wildcard2)
-
Constructor Details
-
XSConstraints
public XSConstraints()
-
-
Method Details
-
getEmptySequence
-
checkTypeDerivationOk
public static boolean checkTypeDerivationOk(org.apache.xerces.xs.XSTypeDefinition derived, org.apache.xerces.xs.XSTypeDefinition base, short block) check whether derived is valid derived from base, given a subset of {restriction, extension}.B -
checkSimpleDerivationOk
public static boolean checkSimpleDerivationOk(XSSimpleType derived, org.apache.xerces.xs.XSTypeDefinition base, short block) check whether simple type derived is valid derived from base, given a subset of {restriction, extension}. -
checkComplexDerivationOk
public static boolean checkComplexDerivationOk(XSComplexTypeDecl derived, org.apache.xerces.xs.XSTypeDefinition base, short block) check whether complex type derived is valid derived from base, given a subset of {restriction, extension}. -
ElementDefaultValidImmediate
public static Object ElementDefaultValidImmediate(org.apache.xerces.xs.XSTypeDefinition type, String value, ValidationContext context, ValidatedInfo vinfo) check whether a value is a valid default for some type returns the compiled form of the value The parameter value could be either a String or a ValidatedInfo object -
fullSchemaChecking
public static void fullSchemaChecking(XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter) used to check the 3 constraints against each complex type (should be each model group): Unique Particle Attribution, Particle Derivation (Restriction), Element Declrations Consistent. -
checkElementDeclsConsistent
public static void checkElementDeclsConsistent(XSComplexTypeDecl type, XSParticleDecl particle, SymbolHash elemDeclHash, SubstitutionGroupHandler sgHandler) throws XMLSchemaException - Throws:
XMLSchemaException
-
findElemInTable
public static void findElemInTable(XSComplexTypeDecl type, XSElementDecl elem, SymbolHash elemDeclHash) throws XMLSchemaException - Throws:
XMLSchemaException
-
overlapUPA
public static boolean overlapUPA(XSElementDecl element1, XSElementDecl element2, SubstitutionGroupHandler sgHandler) -
overlapUPA
public static boolean overlapUPA(XSElementDecl element, XSWildcardDecl wildcard, SubstitutionGroupHandler sgHandler) -
overlapUPA
-
overlapUPA
-