org.apache.xerces.impl.xs

Class XSConstraints


public class XSConstraints
extends java.lang.Object

Constaints shared by traversers and validator
Version:
$Id: XSConstraints.java 320098 2004-10-06 15:14:55Z mrglavas $
Author:
Sandy Gao, IBM

Method Summary

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
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}.
static void
checkElementDeclsConsistent(XSComplexTypeDecl type, XSParticleDecl particle, SymbolHash elemDeclHash, SubstitutionGroupHandler sgHandler)
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}.
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
static 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 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 Details

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

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}.

checkElementDeclsConsistent

public static void checkElementDeclsConsistent(XSComplexTypeDecl type,
                                               XSParticleDecl particle,
                                               SymbolHash elemDeclHash,
                                               SubstitutionGroupHandler sgHandler)
            throws XMLSchemaException

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}.

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

findElemInTable

public static void findElemInTable(XSComplexTypeDecl type,
                                   XSElementDecl elem,
                                   SymbolHash elemDeclHash)
            throws XMLSchemaException

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.

overlapUPA

public static boolean overlapUPA(Object decl1,
                                 Object decl2,
                                 SubstitutionGroupHandler sgHandler)

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)

Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.