com.saxonica.schema
Class ChoiceCompositor

java.lang.Object
  extended bycom.saxonica.schema.SchemaStructure
      extended bycom.saxonica.schema.AbstractParticle
          extended bycom.saxonica.schema.Compositor
              extended bycom.saxonica.schema.ChoiceCompositor
All Implemented Interfaces:
Particle, SchemaComponent, java.io.Serializable, javax.xml.transform.SourceLocator, Term, UserSchemaComponent

public class ChoiceCompositor
extends Compositor

A ChoiceCompositor represents an xs:choice element in the schema

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.saxonica.schema.Compositor
contentModel
 
Fields inherited from class com.saxonica.schema.AbstractParticle
UNBOUNDED
 
Fields inherited from interface net.sf.saxon.type.SchemaComponent
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING
 
Constructor Summary
ChoiceCompositor()
           
 
Method Summary
 boolean isEmptiable()
          Determine if empty content is allowed
 void rewrite()
          Rewrite a particle prior to compiling it
 boolean validate(PreparedSchema schema)
          Checks the validity of this Compositor definition.
 
Methods inherited from class com.saxonica.schema.Compositor
addParticle, checkElements, compile, containsAll, fixup, getElementParticleCardinality, getElementParticleType, getTerm, isEmpty, iterateParticles, lookForCycles
 
Methods inherited from class com.saxonica.schema.AbstractParticle
getMaxOccurs, getMinOccurs, setMaxOccurs, setMinOccurs
 
Methods inherited from class com.saxonica.schema.SchemaStructure
getColumnNumber, getFixupStatus, getLineNumber, getPublicId, getSchema, getSystemId, getValidationStatus, setFixupStatus, setLineNumber, setLocator, setSchema, setSystemId, setValidationStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.saxon.type.SchemaComponent
getValidationStatus
 

Constructor Detail

ChoiceCompositor

public ChoiceCompositor()
Method Detail

isEmptiable

public boolean isEmptiable()
                    throws UnresolvedReferenceException
Determine if empty content is allowed

Returns:
true if empty content matches this compositor, which is true if the compositor as a whole has minOccurs=0, or if any of the choices allows empty content.
Throws:
UnresolvedReferenceException

rewrite

public void rewrite()
Rewrite a particle prior to compiling it

Specified by:
rewrite in interface Particle
Overrides:
rewrite in class Compositor

validate

public boolean validate(PreparedSchema schema)
                 throws SchemaException,
                        ValidationException
Checks the validity of this Compositor definition.

Specified by:
validate in interface UserSchemaComponent
Overrides:
validate in class Compositor
Throws:
SchemaException - when the error listener decides an error is fatal
ValidationException