Class XSConstraints
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.XSConstraints
-
public class XSConstraints extends Object
Constraints shared by traversers and validator- Version:
- $Id$
- Author:
- Sandy Gao, IBM
-
-
Constructor Summary
Constructors Constructor Description XSConstraints()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkComplexDerivationOk(XSComplexTypeDecl derived, XSTypeDefinition base, short block)
check whether complex type derived is valid derived from base, given a subset of {restriction, extension}.static void
checkElementDeclsConsistent(XSComplexTypeDecl type, XSParticleDecl particle, SymbolHash elemDeclHash, SubstitutionGroupHandler sgHandler)
static boolean
checkSimpleDerivationOk(XSSimpleType derived, XSTypeDefinition base, short block)
check whether simple type derived is valid derived from base, given a subset of {restriction, extension}.static boolean
checkTypeDerivationOk(XSTypeDefinition derived, XSTypeDefinition base, short block)
check whether derived is valid derived from base, given a subset of {restriction, extension}.Bstatic Object
ElementDefaultValidImmediate(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 void
findElemInTable(XSComplexTypeDecl type, XSElementDecl elem, SymbolHash elemDeclHash)
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.static XSParticleDecl
getEmptySequence()
static boolean
overlapUPA(Object decl1, Object decl2, SubstitutionGroupHandler sgHandler)
static boolean
overlapUPA(XSElementDecl element1, XSElementDecl element2, SubstitutionGroupHandler sgHandler)
static boolean
overlapUPA(XSElementDecl element, XSWildcardDecl wildcard, SubstitutionGroupHandler sgHandler)
static boolean
overlapUPA(XSWildcardDecl wildcard1, XSWildcardDecl wildcard2)
-
-
-
Method Detail
-
getEmptySequence
public static XSParticleDecl getEmptySequence()
-
checkTypeDerivationOk
public static boolean checkTypeDerivationOk(XSTypeDefinition derived, 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, 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, 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(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
public static boolean overlapUPA(XSWildcardDecl wildcard1, XSWildcardDecl wildcard2)
-
overlapUPA
public static boolean overlapUPA(Object decl1, Object decl2, SubstitutionGroupHandler sgHandler)
-
-