org.apache.xerces.impl.xs

Class SubstitutionGroupHandler

public class SubstitutionGroupHandler extends Object

To store and validate information about substitutionGroup

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

Version: $Id: SubstitutionGroupHandler.java,v 1.18 2005/02/04 03:36:57 mrglavas Exp $

Author: Sandy Gao, IBM

Constructor Summary
SubstitutionGroupHandler(XSGrammarBucket grammarBucket)
Default constructor
Method Summary
voidaddSubstitutionGroup(XSElementDecl[] elements)
add a list of substitution group information.
XSElementDeclgetMatchingElemDecl(QName element, XSElementDecl exemplar)
XSElementDecl[]getSubstitutionGroup(XSElementDecl element)
get all elements that can substitute the given element, according to the spec, we shouldn't consider the {block} constraints. from the spec, substitution group of a given element decl also contains the element itself. but the array returned from this method doesn't containt this element.
booleaninSubstitutionGroup(XSElementDecl element, XSElementDecl exemplar)
voidreset()
clear the internal registry of substitutionGroup information
protected booleansubstitutionGroupOK(XSElementDecl element, XSElementDecl exemplar, short blockingConstraint)

Constructor Detail

SubstitutionGroupHandler

public SubstitutionGroupHandler(XSGrammarBucket grammarBucket)
Default constructor

Method Detail

addSubstitutionGroup

public void addSubstitutionGroup(XSElementDecl[] elements)
add a list of substitution group information.

getMatchingElemDecl

public XSElementDecl getMatchingElemDecl(QName element, XSElementDecl exemplar)

getSubstitutionGroup

public XSElementDecl[] getSubstitutionGroup(XSElementDecl element)
get all elements that can substitute the given element, according to the spec, we shouldn't consider the {block} constraints. from the spec, substitution group of a given element decl also contains the element itself. but the array returned from this method doesn't containt this element.

inSubstitutionGroup

public boolean inSubstitutionGroup(XSElementDecl element, XSElementDecl exemplar)

reset

public void reset()
clear the internal registry of substitutionGroup information

substitutionGroupOK

protected boolean substitutionGroupOK(XSElementDecl element, XSElementDecl exemplar, short blockingConstraint)
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.