Free Trial - Stylus Studio, The World's Best XML IDE!


com.saxonica.schema
Class ChoiceCompositor

java.lang.Object
  |
  +--com.saxonica.schema.SchemaElement
        |
        +--com.saxonica.schema.AbstractParticle
              |
              +--com.saxonica.schema.Compositor
                    |
                    +--com.saxonica.schema.ChoiceCompositor
All Implemented Interfaces:
CircularityChecker, Particle, SchemaComponent, SchemaDeclaration, java.io.Serializable, javax.xml.transform.SourceLocator, Term, ValidationContext

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 class com.saxonica.schema.SchemaElement
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, COMPOSITOR, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD_ATTRIBUTE, WILDCARD_ELEMENT
 
Constructor Summary
ChoiceCompositor()
           
 
Method Summary
 boolean isEmptiable()
          Determine if empty content is allowed
 boolean validate(Schema schema)
          Checks the validity of this Compositor definition.
 
Methods inherited from class com.saxonica.schema.Compositor
addParticle, checkElements, compile, containsAll, fixup, getId, getLocalElementDeclaration, getStructureType, isEmpty, isVoidValidationContext, iterateParticles, lookForCycles, setId
 
Methods inherited from class com.saxonica.schema.AbstractParticle
getMaxOccurs, getMinOccurs, getTerm, setMaxOccurs, setMinOccurs
 
Methods inherited from class com.saxonica.schema.SchemaElement
getColumnNumber, getLineNumber, getPublicId, getSystemId, setLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChoiceCompositor

public ChoiceCompositor()
Method Detail

isEmptiable

public boolean isEmptiable()
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.

validate

public boolean validate(Schema schema)
                 throws javax.xml.transform.TransformerException
Checks the validity of this Compositor definition.

Specified by:
validate in interface SchemaComponent
Overrides:
validate in class Compositor
Throws:
javax.xml.transform.TransformerException - when the error listener decides an error is fatal


Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.