org.apache.xerces.impl.xs

## Class SubstitutionGroupHandler

- java.lang.Object
- - org.apache.xerces.impl.xs.SubstitutionGroupHandler

-     public class SubstitutionGroupHandler
      extends java.lang.Object

  To store and validate information about substitutionGroup
  Version:
    $Id: SubstitutionGroupHandler.java 982470 2010-08-05 04:57:42Z mrglavas $
  Author:
    Sandy Gao, IBM

  # INTERNAL:

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubstitutionGroupHandler(XSElementDeclHelper elementDeclHelper)` Default constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSubstitutionGroup(XSElementDecl[] elements)` add a list of substitution group information.
    `XSElementDecl` | `getMatchingElemDecl(org.apache.xerces.xni.QName element, XSElementDecl exemplar, short schemaVersion)`
    `XSElementDecl[]` | `getSubstitutionGroup(XSElementDecl element, short schemaVersion)` get all elements that can substitute the given element, according to the spec, we shouldn't consider the {block} constraints.
    `boolean` | `inSubstitutionGroup(XSElementDecl element, XSElementDecl exemplar, short schemaVersion)`
    `void` | `reset()` clear the internal registry of substitutionGroup information
    `protected boolean` | `substitutionGroupOK(XSElementDecl element, XSElementDecl exemplar, short blockingConstraint, short schemaVersion)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SubstitutionGroupHandler

          public SubstitutionGroupHandler(XSElementDeclHelper elementDeclHelper)

      Default constructor

  - ### Method Detail

    - #### getMatchingElemDecl

          public XSElementDecl getMatchingElemDecl(org.apache.xerces.xni.QName element,
                                          XSElementDecl exemplar,
                                          short schemaVersion)

    - #### substitutionGroupOK

          protected boolean substitutionGroupOK(XSElementDecl element,
                                    XSElementDecl exemplar,
                                    short blockingConstraint,
                                    short schemaVersion)

    - #### inSubstitutionGroup

          public boolean inSubstitutionGroup(XSElementDecl element,
                                    XSElementDecl exemplar,
                                    short schemaVersion)

    - #### reset

          public void reset()

      clear the internal registry of substitutionGroup information

    - #### addSubstitutionGroup

          public void addSubstitutionGroup(XSElementDecl[] elements)

      add a list of substitution group information.

    - #### getSubstitutionGroup

          public XSElementDecl[] getSubstitutionGroup(XSElementDecl element,
                                             short schemaVersion)

      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.

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.