StscChecker (xmlbeans API)

org.apache.xmlbeans.impl.schema

## Class StscChecker

- java.lang.Object
- - org.apache.xmlbeans.impl.schema.StscChecker

-     public class StscChecker
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StscChecker()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `checkAll()`
    `static void` | `checkFields(SchemaTypeImpl sType)` The following code checks rule #5 of http://www.w3.org/TR/xmlschema-1/#coss-ct as well as attribute + element default/fixed validity.
    `static boolean` | `checkRestriction(SchemaTypeImpl sType)` The following code only checks rule #5 of http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction (Everything else can and should be done in StscResolver, because we can give more detailed line # info there
    `static boolean` | `isParticleValidRestriction(SchemaParticle baseModel, SchemaParticle derivedModel, Collection<XmlError> errors, XmlObject context)` This function takes in two schema particle types, a baseModel, and a derived model and returns true if the derivedModel can be egitimately be used for restriction.

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

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

- - ### Constructor Detail

    - #### StscChecker

          public StscChecker()

  - ### Method Detail

    - #### checkAll

          public static void checkAll()

    - #### checkFields

          public static void checkFields(SchemaTypeImpl sType)

      The following code checks rule #5 of http://www.w3.org/TR/xmlschema-1/#coss-ct as well as attribute + element default/fixed validity.

      Checks that xs:NOTATION is not used directly

    - #### checkRestriction

          public static boolean checkRestriction(SchemaTypeImpl sType)

      The following code only checks rule #5 of http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction (Everything else can and should be done in StscResolver, because we can give more detailed line # info there

    - #### isParticleValidRestriction

          public static boolean isParticleValidRestriction(SchemaParticle baseModel,
                                                           SchemaParticle derivedModel,
                                                           Collection<XmlError> errors,
                                                           XmlObject context)

      This function takes in two schema particle types, a baseModel, and a derived model and returns true if the derivedModel can be egitimately be used for restriction. Errors are put into the errors collections.
      Parameters:
        `baseModel` - - The base schema particle
        `derivedModel` - - The derived (restricted) schema particle
        `errors` - - Invalid restriction errors are put into this collection
        `context` - . the context
      Returns:
        boolean, true if valid restruction, false if invalid restriction